mono.git
21 years ago2003-04-10 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Fri, 11 Apr 2003 00:14:12 +0000 (00:14 -0000)]
2003-04-10  Miguel de Icaza  <miguel@ximian.com>

* expression.cs (Binary.Emit): Test first for doubles instead of
floats, as they are more common.

(Binary.EmitBranchable): Use the .un version of the branch opcodes
when dealing with floats and the <=, >= operators.  This fixes bug
#39314

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

21 years ago2003-04-10 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Thu, 10 Apr 2003 22:16:12 +0000 (22:16 -0000)]
2003-04-10  Miguel de Icaza  <miguel@ximian.com>

* statement.cs (Foreach.EmitArrayForeach): bug fix: The code used
to load the array value by emitting a load on the foreach variable
type.  This was incorrect.

We now emit the code to load an element using the the array
variable type, and then we emit the conversion operator.

Fixed #40176

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

21 years agoImprove test
Miguel de Icaza [Thu, 10 Apr 2003 22:15:22 +0000 (22:15 -0000)]
Improve test

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

21 years ago2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
Gonzalo Paniagua Javier [Thu, 10 Apr 2003 19:10:50 +0000 (19:10 -0000)]
2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>

* reflection.c: fix from Jaak <jaak@zd.com.pl>.

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

21 years ago2003-04-09 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Thu, 10 Apr 2003 18:52:35 +0000 (18:52 -0000)]
2003-04-09  Miguel de Icaza  <miguel@ximian.com>

* class.cs (MethodSignature.InheritableMemberSignatureCompare):
test for protection before we test for signatures.

(MethodSignature.ToString): implement.

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

21 years ago * RemotingProxy.cs: Added support for Async and OneWay messages.
Lluis Sanchez [Thu, 10 Apr 2003 16:31:02 +0000 (16:31 -0000)]
* RemotingProxy.cs: Added support for Async and OneWay messages.

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

21 years ago * AsyncResult.cs: implemented some methods.
Lluis Sanchez [Thu, 10 Apr 2003 16:30:23 +0000 (16:30 -0000)]
* AsyncResult.cs: implemented some methods.
* ClientContextTerminatorSink.cs: Improved support for Async and OneWay messages.
* MonoMethodMessage.cs: Added member needed to support Async messages.
* ServerObjectTerminatorSink.cs: Improved support for Async and OneWay messages.

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

21 years ago * CrossContextChannel.cs: Improved support for OneWay and Async messages.
Lluis Sanchez [Thu, 10 Apr 2003 16:29:44 +0000 (16:29 -0000)]
* CrossContextChannel.cs: Improved support for OneWay and Async messages.

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

21 years ago * ChannelDataStore.cs: renamed some members to match MS.NET.
Lluis Sanchez [Thu, 10 Apr 2003 16:29:13 +0000 (16:29 -0000)]
* ChannelDataStore.cs: renamed some members to match MS.NET.
* ChannelServices.cs: renamed ChannelInfoStore an its members to match MS.NET.
* CrossAppDomainChannel.cs: Renamed CrossAppDomainChannelData to match MS.NET.
  Added processId property to CrossAppDomainData. Now it is checked in CreateSink.

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

21 years ago * ObjRef.cs: Renamed ChannelInfoStore to ChannelInfo (match MS.NET)
Lluis Sanchez [Thu, 10 Apr 2003 16:26:53 +0000 (16:26 -0000)]
* ObjRef.cs: Renamed ChannelInfoStore to ChannelInfo (match MS.NET)
* RemotingServices.cs: Added method to help support Async messages.
* RemotingConfiguration.cs: Implemented property ProcessID.

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

21 years ago * AppDomain.cs: Added internal method for getting process guid.
Lluis Sanchez [Thu, 10 Apr 2003 16:24:54 +0000 (16:24 -0000)]
* AppDomain.cs: Added internal method for getting process guid.

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

21 years ago * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process...
Lluis Sanchez [Thu, 10 Apr 2003 16:24:11 +0000 (16:24 -0000)]
* appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
* object.c: fixed bug in the construction of vtable for proxies

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

21 years ago2003-04-10 Zoltan Varga <vargaz@freemail.hu>
Zoltan Varga [Thu, 10 Apr 2003 15:59:42 +0000 (15:59 -0000)]
2003-04-10  Zoltan Varga  <vargaz@freemail.hu>

* mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.

* driver.c: Added --print-vtable option as in the old JIT.

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

21 years agoThu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
Paolo Molaro [Thu, 10 Apr 2003 15:51:45 +0000 (15:51 -0000)]
Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>

* inssel-long32.brg, exceptions.cs: fix conversions from long, too.

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

21 years ago2003-04-10 Zoltan Varga <vargaz@freemail.hu>
Zoltan Varga [Thu, 10 Apr 2003 15:51:12 +0000 (15:51 -0000)]
2003-04-10  Zoltan Varga  <vargaz@freemail.hu>

* object.c (mono_array_new): Mark mono_array_new as an icall.

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

21 years ago2003-04-10 Ville Palo <vi64pa@kolumbus.fi>
Ville Palo [Thu, 10 Apr 2003 15:24:45 +0000 (15:24 -0000)]
2003-04-10  Ville Palo <vi64pa@kolumbus.fi>

* StringWriterTest.cs: Added couple of tests.

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

21 years ago2003-04-10 Ville Palo <vi64pa@kolumbus.fi>
Ville Palo [Thu, 10 Apr 2003 15:10:56 +0000 (15:10 -0000)]
2003-04-10  Ville Palo <vi64pa@kolumbus.fi>

* ConvertTest.cs: Added some tests for ToXXX methods.
TestConvertFromNull ()

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

21 years agoThu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
Paolo Molaro [Thu, 10 Apr 2003 14:36:43 +0000 (14:36 -0000)]
Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>

* inssel.brg, basic.cs: fixed checked conversions to byte and short.

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

21 years ago2003-04-10 Zoltan Varga <vargaz@freemail.hu>
Zoltan Varga [Thu, 10 Apr 2003 12:07:15 +0000 (12:07 -0000)]
2003-04-10  Zoltan Varga  <vargaz@freemail.hu>

* attribute.cs: Avoid allocation of ArrayLists in the common case.

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

21 years ago2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
Gonzalo Paniagua Javier [Thu, 10 Apr 2003 02:23:21 +0000 (02:23 -0000)]
2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>

* class.c: fixed test for public method when overriding interfaces.
Closes bug #40970.

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

21 years agoAdded my person to the team page :).
Hector E. Gomez Morales [Thu, 10 Apr 2003 02:08:45 +0000 (02:08 -0000)]
Added my person to the team page :).

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

21 years agooops
Ben Maurer [Thu, 10 Apr 2003 01:30:02 +0000 (01:30 -0000)]
oops

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

21 years agoadd myself to team
Daniel Morgan [Thu, 10 Apr 2003 01:23:12 +0000 (01:23 -0000)]
add myself to team

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

21 years agoRemove writeLine
Miguel de Icaza [Wed, 9 Apr 2003 22:47:52 +0000 (22:47 -0000)]
Remove writeLine

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

21 years ago2003-04-09 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Wed, 9 Apr 2003 21:00:06 +0000 (21:00 -0000)]
2003-04-09  Miguel de Icaza  <miguel@ximian.com>

* expression.cs (Unary.TryReduceNegative): Add missing minus sign
to the case where we reduced into a LongConstant.

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

21 years ago2003-04-09 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Wed, 9 Apr 2003 20:54:34 +0000 (20:54 -0000)]
2003-04-09  Miguel de Icaza  <miguel@ximian.com>

* decl.cs (CheckAccessLevel): If the type is an array, we can not
depend on whether the information is acurrate, because the
Microsoft runtime will always claim that the array type is public,
regardless of the real state.

If the type is a pointer, another problem happens: the type is
reported as non-public in Microsoft.

In both cases we have to call CheckAccessLevel recursively with
the underlying type as the argument to be tested.

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

21 years ago2003-04-08 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Wed, 9 Apr 2003 20:36:16 +0000 (20:36 -0000)]
2003-04-08  Miguel de Icaza  <miguel@ximian.com>

* assign.cs (Assign.Emit): If we are dealing with a compound
assignment expression, we should use the code path that stores the
intermediate result in a temporary value.  This fixes #40903.

*expression.cs (Indirection.ToString): Provide ToString method for
debugging.

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

21 years agoAdd new test
Miguel de Icaza [Wed, 9 Apr 2003 20:33:05 +0000 (20:33 -0000)]
Add new test

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

21 years ago2003-04-09 Zoltan Varga <vargaz@freemail.hu>
Zoltan Varga [Wed, 9 Apr 2003 19:39:17 +0000 (19:39 -0000)]
2003-04-09  Zoltan Varga  <vargaz@freemail.hu>

* mini.c regalloc.c regalloc.h: Fix memory leak.

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

21 years ago2003-04-09 Ville Palo <vi64pa@kolumbus.fi>
Ville Palo [Wed, 9 Apr 2003 18:20:11 +0000 (18:20 -0000)]
2003-04-09  Ville Palo <vi64pa@kolumbus.fi>

* Array.cs: Little fix to compare () method.

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

21 years ago2003-04-09 Zoltan Varga <vargaz@freemail.hu>
Zoltan Varga [Wed, 9 Apr 2003 16:27:31 +0000 (16:27 -0000)]
2003-04-09  Zoltan Varga  <vargaz@freemail.hu>

* String.cs (Equals): Add trivial optimization.

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

21 years ago2003-04-09 Ville Palo <vi64pa@kolumbus.fi>
Ville Palo [Wed, 9 Apr 2003 15:26:01 +0000 (15:26 -0000)]
2003-04-09  Ville Palo <vi64pa@kolumbus.fi>

* ArraListTest.cs: Added little test for Sort ().

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

21 years ago2003-04-09 Dietmar Maurer <dietmar@ximian.com>
Dietmar Maurer [Wed, 9 Apr 2003 15:21:31 +0000 (15:21 -0000)]
2003-04-09  Dietmar Maurer  <dietmar@ximian.com>

* aot.c (mono_aot_get_method): register all used strings

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

21 years ago2003-04-09 Dick Porter <dick@ximian.com>
Dick Porter [Wed, 9 Apr 2003 14:26:26 +0000 (14:26 -0000)]
2003-04-09  Dick Porter  <dick@ximian.com>

* Thread.cs: Make sure a reference to the ThreadStart delegate is
held.  There's no telling how long it will be before
Thread.Start() is called, and GC might destroy the delegate.
Thread() and Start() need to be rewritten so that the runtime
creates the new thread when Start() is called, which will simplify
the code a great deal.

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

21 years agoWed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
Paolo Molaro [Wed, 9 Apr 2003 13:30:17 +0000 (13:30 -0000)]
Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>

* mini.c: always intern strings references with ldstr at compile time.

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

21 years agoWed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
Paolo Molaro [Wed, 9 Apr 2003 13:28:46 +0000 (13:28 -0000)]
Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>

* appdomain.h, domain.c: added mono_domain_foreach() to
be able to access the currently loaded appdomains.
* object.c: make string interning work across sppdomains.
Mark some functions for use as icalls.

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

21 years ago2003-04-08 Gaurav Vaish <gvaish_mono AT lycos.com>
Gaurav Vaish [Wed, 9 Apr 2003 11:48:05 +0000 (11:48 -0000)]
2003-04-08 Gaurav Vaish <gvaish_mono AT lycos.com>

* Style.cs               : Implements interfaces now.

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

21 years ago2003-04-09 Zoltan Varga <vargaz@freemail.hu>
Zoltan Varga [Wed, 9 Apr 2003 11:29:19 +0000 (11:29 -0000)]
2003-04-09  Zoltan Varga  <vargaz@freemail.hu>

* class.c reflection.c: Fix memory leaks reported by ccmalloc.

* reflection.h reflection.c: Allocate long living data using
GC_MALLOC_ATOMIC so the collector does not need to scan it.

* reflection.c: Double the allocation size in streams instead of
increasing it, to prevent unneccesary copying on large assemblies.

* reflection.c (mono_reflection_create_runtime_class): Avoid vtable
creation if the assembly does not have the Run flag set.

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

21 years agoOoops, this is the correct test-190.cs file.
Martin Baulig [Wed, 9 Apr 2003 10:59:26 +0000 (10:59 -0000)]
Ooops, this is the correct test-190.cs file.

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

21 years ago2003-04-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
Gonzalo Paniagua Javier [Wed, 9 Apr 2003 05:12:44 +0000 (05:12 -0000)]
2003-04-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>

* list: added Watcher.cs
* System.Web.Caching/CacheDependency.cs:
* System.Web.Caching/CacheEntry.cs:
* System.Web.Caching/Watcher.cs: added a FileSystemWatcher-like class for dependency
checking.

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

21 years agoAdded more syntatic rules: if_statement, while and for-in statements, initial array_l...
César Natarén [Wed, 9 Apr 2003 03:13:08 +0000 (03:13 -0000)]
Added more syntatic rules: if_statement, while and for-in statements, initial array_litetal definition, and elision.

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

21 years agoAdd README
Miguel de Icaza [Tue, 8 Apr 2003 23:51:53 +0000 (23:51 -0000)]
Add README

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

21 years agoSync with changes we lost
Miguel de Icaza [Tue, 8 Apr 2003 23:05:26 +0000 (23:05 -0000)]
Sync with changes we lost

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

21 years ago2003-04-08 Zoltan Varga <vargaz@freemail.hu>
Miguel de Icaza [Tue, 8 Apr 2003 23:04:36 +0000 (23:04 -0000)]
2003-04-08  Zoltan Varga  <vargaz@freemail.hu>

        * class.cs: Null out fields holding references to Block objects so
        they can be garbage collected.

        * expression.cs (OverloadResolve): Remove unused local.

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

21 years ago2003-04-07 Martin Baulig <martin@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 23:02:44 +0000 (23:02 -0000)]
2003-04-07  Martin Baulig  <martin@ximian.com>

* ecore.cs (Expression.ResolveBoolean): Don't call ec.Mark().

* codegen.cs (EmitContext.EmitTopBlock): Don't call Mark() on the
location.  [FIXME: The location argument which gets passed to this
method is sometimes wrong!]

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

21 years ago2003-04-07 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 23:02:40 +0000 (23:02 -0000)]
2003-04-07  Miguel de Icaza  <miguel@ximian.com>

* expression.cs (Indirection.EmitAssign): We were using the
temporary, but returning immediately instead of continuing the
EmitAssing flow.

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

21 years ago2003-04-07 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 23:02:35 +0000 (23:02 -0000)]
2003-04-07  Miguel de Icaza  <miguel@ximian.com>

* expression.cs (Indirection.EmitAssign): We were using the
temporary, but returning immediately instead of continuing the
EmitAssing flow.

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

21 years ago2003-04-06 Martin Baulig <martin@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 23:02:27 +0000 (23:02 -0000)]
2003-04-06  Martin Baulig  <martin@ximian.com>

* ecore.cs (SimpleName.SimpleNameResolve): Don't report an error
if it's a nested child, but also deriving from the outer class.
See test 190.cs.

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

21 years ago2003-04-06 Martin Baulig <martin@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 23:02:23 +0000 (23:02 -0000)]
2003-04-06  Martin Baulig  <martin@ximian.com>

* typemanager.cs (IsNestedChildOf): Make this work if it's a
nested child, but also deriving from the outer class.  See
test-190.cs.
(FilterWithClosure): We may access private members of the outer
class if we're a nested child and deriving from the outer class.
(RealMemberLookup): Only set `closure_private_ok' if the
`original_bf' contained BindingFlags.NonPublic.

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

21 years ago2003-04-07 Martin Baulig <martin@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 23:02:19 +0000 (23:02 -0000)]
2003-04-07  Martin Baulig  <martin@ximian.com>

* codegen.cs (EmitContext.CurrentFile): New public field.
(EmitContext.Mark): Use the CurrentFile to check whether the
location is in the correct file.
(EmitContext.EmitTopBlock): Initialize CurrentFile here.

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

21 years ago2003-04-05 Martin Baulig <martin@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 23:02:13 +0000 (23:02 -0000)]
2003-04-05  Martin Baulig  <martin@ximian.com>

* statement.cs (FlowBranching.UsageVector.MergeChildren): Fix bug #40670.

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

21 years agoFix compilation.
Miguel de Icaza [Tue, 8 Apr 2003 23:02:09 +0000 (23:02 -0000)]
Fix compilation.

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

21 years ago2003-04-02 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 23:02:06 +0000 (23:02 -0000)]
2003-04-02  Miguel de Icaza  <miguel@ximian.com>

* class.cs (Event.Define): Do not allow abstract events to have
initializers.

2003-04-01  Miguel de Icaza  <miguel@ximian.com>

* cs-parser.jay: Add error productions for ADD/REMOVE missing a
block in event declarations.

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

21 years ago2003-04-01 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 23:01:57 +0000 (23:01 -0000)]
2003-04-01  Miguel de Icaza  <miguel@ximian.com>

* expression.cs (Is.Emit): For action `LeaveOnStack' we were
leaving a class on the stack instead of a boolean value (int
0/1).  Change the code so we compare against null, and then the

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

21 years ago2003-04-01 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 23:01:49 +0000 (23:01 -0000)]
2003-04-01  Miguel de Icaza  <miguel@ximian.com>

* class.cs (TypeContainer.GetClassBases): We were checking for the
parent class being sealed too late.

* expression.cs (Binary.Emit): For <= and >= when dealing with
floating point values, use cgt.un and clt.un instead of cgt and
clt alone.

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

21 years ago2003-04-01 Zoltan Varga <vargaz@freemail.hu>
Miguel de Icaza [Tue, 8 Apr 2003 23:01:33 +0000 (23:01 -0000)]
2003-04-01  Zoltan Varga  <vargaz@freemail.hu>

* statement.cs: Apply the same optimization as MS: skip the
GetEnumerator returning an IEnumerator, and use the one returning a
CharEnumerator instead. This allows us to avoid the try-finally block
and the boxing.

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

21 years ago2003-03-31 Gaurav Vaish <gvaish_mono@lycos.com>
Miguel de Icaza [Tue, 8 Apr 2003 23:01:29 +0000 (23:01 -0000)]
2003-03-31  Gaurav Vaish <gvaish_mono@lycos.com>

* cs-parser.jay: Attributes cannot be applied to
                 namespaces. Fixes #40473

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

21 years ago2003-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 23:01:25 +0000 (23:01 -0000)]
2003-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>

* class.cs:
(Add*): check if the name is valid using the full name for constants,
fields, properties and events.

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

21 years ago2003-03-28 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 23:01:16 +0000 (23:01 -0000)]
2003-03-28  Miguel de Icaza  <miguel@ximian.com>

* enum.cs (Enum.DefineType, Enum.IsValidEnumConstant): Also allow
char constants to be part of the enumeration.

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

21 years ago2003-02-25 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 23:01:10 +0000 (23:01 -0000)]
2003-02-25  Miguel de Icaza  <miguel@ximian.com>

* makefile (all): Make it so that doing `make' will run the
default tests depending on Windows/Linux.

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

21 years ago2003-03-28 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 23:01:02 +0000 (23:01 -0000)]
2003-03-28  Miguel de Icaza  <miguel@ximian.com>

* class.cs (TypeContainer.CheckPairedOperators): Report error for missmatch on
operator true/false as required by the spec.

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

21 years ago2003-03-28 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 23:00:53 +0000 (23:00 -0000)]
2003-03-28  Miguel de Icaza  <miguel@ximian.com>

* expression.cs (Unary.ResolveOperator): In LogicalNot, do an
implicit conversion to boolean.

* statement.cs (Statement.ResolveBoolean): A boolean expression is
also one where the type implements `operator true'.

* ecore.cs (Expression.GetOperatorTrue): New helper routine to
get an expression that will invoke operator true based on an
expression.

(GetConversionOperators): Removed the hack that called op_True
here.

(Expression.ResolveBoolean): Move this from Statement.

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

21 years ago2003-03-17 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 23:00:44 +0000 (23:00 -0000)]
2003-03-17  Miguel de Icaza  <miguel@ximian.com>

* ecore.cs (FieldExpr): do not allow initialization of initonly
fields on derived classes

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

21 years ago2003-03-13 Martin Baulig <martin@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 23:00:40 +0000 (23:00 -0000)]
2003-03-13  Martin Baulig  <martin@ximian.com>

* statement.cs (Block.Emit): Call ig.BeginScope() and
ig.EndScope() when compiling with debugging info; call
LocalBuilder.SetLocalSymInfo _after_ opening the scope.

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

21 years ago2003-03-08 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 23:00:36 +0000 (23:00 -0000)]
2003-03-08  Miguel de Icaza  <miguel@ximian.com>

* expression.cs (Indexers): Do not construct immediately, allow
for new members to be appended as we go.  Fixes 38143

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

21 years ago2003-03-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 23:00:32 +0000 (23:00 -0000)]
2003-03-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>

* expression.cs: save/restore context when resolving an unchecked
expression.

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

21 years ago2003-03-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 23:00:28 +0000 (23:00 -0000)]
2003-03-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>

* expression.cs: save/restore context when resolving an unchecked
expression.

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

21 years ago2003-03-05 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 23:00:19 +0000 (23:00 -0000)]
2003-03-05  Miguel de Icaza  <miguel@ximian.com>

* cfold.cs: Catch division by zero in modulus operator during
constant folding.

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

21 years ago2003-03-03 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 23:00:15 +0000 (23:00 -0000)]
2003-03-03  Miguel de Icaza  <miguel@ximian.com>

* interface.cs (Interface.DefineMembers): Avoid defining members
twice.

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

21 years ago2003-02-27 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 23:00:10 +0000 (23:00 -0000)]
2003-02-27  Miguel de Icaza  <miguel@ximian.com>

* driver.cs: handle the +/- options for -noconfig

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

21 years ago2003-02-27 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 23:00:05 +0000 (23:00 -0000)]
2003-02-27  Miguel de Icaza  <miguel@ximian.com>

* statement.cs (Unchecked.Resolve): Also track the state in the Resolve phase.

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

21 years ago2003-02-27 Martin Baulig <martin@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 23:00:01 +0000 (23:00 -0000)]
2003-02-27  Martin Baulig  <martin@ximian.com>

* ecore.cs (Expression.MemberLookup): Don't create a
MethodGroupExpr for something which is not a method.  Fixes #38291.

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

21 years ago2003-02-25 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 22:59:55 +0000 (22:59 -0000)]
2003-02-25  Miguel de Icaza  <miguel@ximian.com>

* class.cs (MemberBase.CheckParameters): Also check that the type
is unmanaged if it is a pointer.

* expression.cs (SizeOf.Resolve): Add location information.

* statement.cs (Block.EmitMeta): Flag error (208) if a pointer to
a managed type is declared.

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

21 years ago2003-02-25 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 22:59:41 +0000 (22:59 -0000)]
2003-02-25  Miguel de Icaza  <miguel@ximian.com>

* expression.cs (Invocation.VerifyArgumentsCompat): Check for the
parameter modifiers as well.  Fixes bug 38606

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

21 years ago2003-02-25 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 22:59:33 +0000 (22:59 -0000)]
2003-02-25  Miguel de Icaza  <miguel@ximian.com>

* class.cs: Very sad.  Am backing out the speed up changes
introduced by the ArrayList -> Array in the TypeContainer, as they
were not actually that much faster, and introduced a bug (no error
reports on duplicated methods).

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

21 years ago Another change. Use target.Resolve instead of LValueResolve.
Miguel de Icaza [Tue, 8 Apr 2003 22:59:25 +0000 (22:59 -0000)]
Another change.  Use target.Resolve instead of LValueResolve.
Although we are resolving for LValues, we will let the Assign code
take care of that (it will be called again from Resolve).  This
basically allows code like this:

class X { X operator + (X x, object o) {} X this [int idx] { get; set; } }
class Y { void A (X x) { x [0] += o; }

The problem was that the indexer was trying to resolve for
set_Item (idx, object o) and never finding one.  The real set_Item
was set_Item (idx, X).  By delaying the process we get the right
semantics.

Fixes bug: 36505

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

21 years ago2003-02-25 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 22:59:20 +0000 (22:59 -0000)]
2003-02-25  Miguel de Icaza  <miguel@ximian.com>

* assign.cs (CompoundAssign.DoLResolve): Resolve the original
source first, this will guarantee that we have a valid expression
before calling in lower levels functions that will require a
resolved object.  Then use this original_source in the
target.ResolveLValue instead of the original source that was
passed to us.

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

21 years ago2003-02-23 Martin Baulig <martin@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 22:59:16 +0000 (22:59 -0000)]
2003-02-23  Martin Baulig  <martin@ximian.com>

* statement.cs (Block.Emit): Override this and set ec.CurrentBlock
while calling DoEmit ().

* codegen.cs (EmitContext.Mark): Don't mark locations in other
source files; if you use the #line directive inside a method, the
compiler stops emitting line numbers for the debugger until it
reaches the end of the method or another #line directive which
restores the original file.

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

21 years ago2003-02-23 Martin Baulig <martin@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 22:59:12 +0000 (22:59 -0000)]
2003-02-23  Martin Baulig  <martin@ximian.com>

* statement.cs (FlowBranching.UsageVector.MergeChildren): Fix bug #37708.

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

21 years ago2003-02-23 Martin Baulig <martin@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 22:59:07 +0000 (22:59 -0000)]
2003-02-23  Martin Baulig  <martin@ximian.com>

* statement.cs (Block.AddChildVariableNames): We need to call this
recursively, not just for our immediate children.

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

21 years ago2003-02-23 Martin Baulig <martin@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 22:59:03 +0000 (22:59 -0000)]
2003-02-23  Martin Baulig  <martin@ximian.com>

* class.cs (Event.Define): Always make the field private, like csc does.

* typemanager.cs (TypeManager.RealMemberLookup): Make events
actually work, fixes bug #37521.

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

21 years ago2003-02-23 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 22:58:55 +0000 (22:58 -0000)]
2003-02-23  Miguel de Icaza  <miguel@ximian.com>

* delegate.cs: When creating the various temporary "Parameters"
classes, make sure that we call the ComputeAndDefineParameterTypes
on those new parameters (just like we do with the formal ones), to
allow them to be resolved in the context of the DeclSpace.

This fixes the bug that Dick observed in Bugzilla #38530.

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

21 years ago2003-02-22 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 22:58:50 +0000 (22:58 -0000)]
2003-02-22  Miguel de Icaza  <miguel@ximian.com>

* expression.cs (ResolveMemberAccess): When resolving a constant,
do not attempt to pull a constant if the value was not able to
generate a valid constant.

* const.cs (LookupConstantValue): Do not report more errors than required.

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

21 years ago2003-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 22:58:42 +0000 (22:58 -0000)]
2003-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>

* expression.cs: fixes bug #38328.

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

21 years ago2003-02-18 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 22:58:33 +0000 (22:58 -0000)]
2003-02-18  Miguel de Icaza  <miguel@ximian.com>

* class.cs: Changed all the various members that can be part of a
class from being an ArrayList to be an Array of the right type.
During the DefineType type_list, interface_list, delegate_list and
enum_list are turned into types, interfaces, delegates and enums
arrays.

And during the member population, indexer_list, event_list,
constant_list, field_list, instance_constructor_list, method_list,
operator_list and property_list are turned into their real arrays.

Although we could probably perform this operation earlier, for
good error reporting we need to keep the lists and remove the
lists for longer than required.

This optimization was triggered by Paolo profiling the compiler
speed on the output of `gen-sample-program.pl' perl script.

* decl.cs (DeclSpace.ResolveType): Set the ContainerType, so we do
not crash in methods like MemberLookupFailed that use this field.

This problem arises when the compiler fails to resolve a type
during interface type definition for example.

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

21 years ago2003-02-18 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 22:58:25 +0000 (22:58 -0000)]
2003-02-18  Miguel de Icaza  <miguel@ximian.com>

* expression.cs (Indexers.GetIndexersForType): Interfaces do not
inherit from System.Object, so we have to stop at null, not only
when reaching System.Object.

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

21 years ago2003-02-17 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 22:58:16 +0000 (22:58 -0000)]
2003-02-17  Miguel de Icaza  <miguel@ximian.com>

* expression.cs: (Indexers.GetIndexersForType): Martin's fix used
DeclaredOnly because the parent indexer might have had a different
name, but did not loop until the top of the hierarchy was reached.

The problem this one fixes is 35492: when a class implemented an
indexer from an interface, we were getting the interface method
(which was abstract) and we were flagging an error (can not invoke
abstract method).

This also keeps bug 33089 functioning, and test-148 functioning.

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

21 years ago2003-02-17 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 22:58:08 +0000 (22:58 -0000)]
2003-02-17  Miguel de Icaza  <miguel@ximian.com>

* typemanager.cs (IsSpecialMethod): The correct way of figuring
out if a method is special is to see if it is declared in a
property or event, or whether it is one of the predefined operator
names.   This should fix correctly #36804.

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

21 years ago2003-02-15 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 22:58:00 +0000 (22:58 -0000)]
2003-02-15  Miguel de Icaza  <miguel@ximian.com>

The goal here is to remove the dependency on EmptyCast.Peel ().
Killing it completely.

The problem is that currently in a number of places where
constants are expected, we have to "probe" for an EmptyCast, and
Peel, which is not the correct thing to do, as this will be
repetitive and will likely lead to errors.

The idea is to remove any EmptyCasts that are used in casts that
can be reduced to constants, so we only have to cope with
constants.

This bug hunt was triggered by Bug 37363 and the desire to remove
the duplicate pattern where we were "peeling" emptycasts to check
whether they were constants.  Now constants will always be
constants.

* ecore.cs: Use an enumconstant here instead of wrapping with
EmptyCast.

* expression.cs (Cast.TryReduce): Ah, the tricky EnumConstant was
throwing me off.  By handling this we can get rid of a few hacks.

* statement.cs (Switch): Removed Peel() code.

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

21 years ago2003-02-14 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 22:57:52 +0000 (22:57 -0000)]
2003-02-14  Miguel de Icaza  <miguel@ximian.com>

* class.cs: Location information for error 508

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

21 years ago2003-02-14 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 22:57:44 +0000 (22:57 -0000)]
2003-02-14  Miguel de Icaza  <miguel@ximian.com>

* expression.cs (New.DoResolve): Add a guard against double
resolution of an expression.

The New DoResolve might be called twice when initializing field
expressions (see EmitFieldInitializers, the call to
GetInitializerExpression will perform a resolve on the expression,
and later the assign will trigger another resolution

This leads to bugs (#37014)

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

21 years ago2003-02-14 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 22:57:36 +0000 (22:57 -0000)]
2003-02-14  Miguel de Icaza  <miguel@ximian.com>

* delegate.cs: The signature for EndInvoke should contain any ref
or out parameters as well.  We were not doing this in the past.

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

21 years ago2003-02-14 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 22:57:32 +0000 (22:57 -0000)]
2003-02-14  Miguel de Icaza  <miguel@ximian.com>

* class.cs (Field.Define): Do not overwrite the type definition
inside the `volatile' group.  Turns out that volatile enumerations
were changing the type here to perform a validity test, which
broke conversions.

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

21 years ago2003-02-12 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 22:57:23 +0000 (22:57 -0000)]
2003-02-12  Miguel de Icaza  <miguel@ximian.com>

* ecore.cs (FieldExpr.AddressOf): In the particular case of This
and structs, we do not want to load the instance variable

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

21 years agoOops. Wrongg ChangeLog entry
Miguel de Icaza [Tue, 8 Apr 2003 22:57:19 +0000 (22:57 -0000)]
Oops.  Wrongg ChangeLog entry

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

21 years ago2003-02-12 Zoltan Varga <vargaz@freemail.hu>
Miguel de Icaza [Tue, 8 Apr 2003 22:57:15 +0000 (22:57 -0000)]
2003-02-12  Zoltan Varga  <vargaz@freemail.hu>

* attribute.cs (ApplyAttributes): apply all MethodImplAttributes, not
just InternalCall.

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

21 years ago2003-02-09 Martin Baulig <martin@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 22:57:11 +0000 (22:57 -0000)]
2003-02-09  Martin Baulig  <martin@ximian.com>

* namespace.cs (Namespace..ctor): Added SourceFile argument.
(Namespace.DefineNamespaces): New static public method; this is
called when we're compiling with debugging to add all namespaces
to the symbol file.

* tree.cs (Tree.RecordNamespace): Added SourceFile argument and
pass it to the Namespace's .ctor.

* symbolwriter.cs (SymbolWriter.OpenMethod): Added TypeContainer
and MethodBase arguments; pass the namespace ID to the symwriter;
pass the MethodBase instead of the token to the symwriter.
(SymbolWriter.DefineNamespace): New method to add a namespace to
the symbol file.

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

21 years ago2003-02-09 Martin Baulig <martin@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 22:57:03 +0000 (22:57 -0000)]
2003-02-09  Martin Baulig  <martin@ximian.com>

* symbolwriter.cs: New file.  This is a wrapper around
ISymbolWriter with a cleaner API.  We'll dynamically Invoke()
methods here in near future.

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

21 years ago2003-02-09 Martin Baulig <martin@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 22:56:53 +0000 (22:56 -0000)]
2003-02-09  Martin Baulig  <martin@ximian.com>

* codegen.cs (EmitContext.Mark): Just pass the arguments to
ILGenerator.MarkSequencePoint() which are actually used by the
symbol writer.

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

21 years ago2003-02-09 Martin Baulig <martin@ximian.com>
Miguel de Icaza [Tue, 8 Apr 2003 22:56:49 +0000 (22:56 -0000)]
2003-02-09  Martin Baulig  <martin@ximian.com>

* location.cs (SourceFile): New public sealed class.  This
contains the name and an index which is used in the location's token.
(Location): Reserve an appropriate number of bits in the token for
the source file instead of walking over that list, this gives us a
really huge performance improvement when compiling with debugging.

* driver.cs (Driver.parse, Driver.tokenize_file): Take a
`SourceFile' argument instead of a string.
(Driver.ProcessFile): Add all the files via Location.AddFile(),
but don't parse/tokenize here, we need to generate the list of all
source files before we do that.
(Driver.ProcessFiles): New static function.  Parses/tokenizes all
the files.

* cs-parser.jay (CSharpParser): Take a `SourceFile' argument
instead of a string.

* cs-tokenizer.cs (Tokenizer): Take `SourceFile' argument instead
of a string.

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