/
ChangeLog
executable file
·16639 lines (11147 loc) · 568 KB
/
ChangeLog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2004-09-21 Martin Baulig <martin@ximian.com>
Merged latest changes into gmcs. Please keep this comment in
here, it makes it easier for me to see what changed in MCS since
the last time I merged.
2004-09-21 Martin Baulig <martin@ximian.com>
* codegen.cs (VariableStorage): Don't store the ILGenerator here;
if we're used in an iterator, we may be called from different
methods.
* statement.cs (Foreach.EmitFinally): Only emit an `Endfinally' if
we actually have an exception block.
2004-09-20 John Luke <jluke@cfl.rr.com>
* class.cs, cs-parser.jay: Improve the error report for 1520:
report the actual line where the error happens, not where the
class was declared.
* assign.cs, delegate.cs, ecore.cs, expression.cs, statement.cs:
Pass location information that was available elsewhere.
2004-09-19 Sebastien Pouliot <sebastien@ximian.com>
* codegen.cs: Fix bug #56621. It is now possible to use MCS on the MS
runtime to delay sign assemblies.
2004-09-19 Miguel de Icaza <miguel@ximian.com>
* cs-parser.jay: Do not report the stack trace, this is barely
used nowadays.
2004-08-22 John Luke <john.luke@gmail.com>
* driver.cs : check that a resource id is not already used
before adding it, report CS1508 if it is, bug #63637
2004-09-19 Miguel de Icaza <miguel@ximian.com>
* ecore.cs: Removed dead code.
2004-09-18 Marek Safar <marek.safar@seznam.cz>
* class.cs: Do not report warning CS0067 on the interfaces.
2004-09-16 Marek Safar <marek.safar@seznam.cz>
* cs-parser.jay: Add error 504 report.
2004-09-16 Marek Safar <marek.safar@seznam.cz>
* rootcontext.cs: WarningLevel is 4 by default now.
* statement.cs (Fixed.Resolve): Do not null
VariableInfo.
2004-09-16 Marek Safar <marek.safar@seznam.cz>
Fixed bug #55780
* ecore.cs (PropertyExpr.FindAccessors): Do not perform
deep search when property is not virtual.
(PropertyExpr.ResolveAccessors): Make one call for both
accessors.
2004-09-15 Marek Safar <marek.safar@seznam.cz>
Fixed bug #65766
* statement.cs: Error 152 report constains also location.
2004-09-15 Marek Safar <marek.safar@seznam.cz>
Fixed bug #65766
* const.cs: Explicitly set constant as static.
2004-09-15 Marek Safar <marek.safar@seznam.cz>
Fixed bug #64226
* cs-parser.jay: Add error 1017 report.
2004-09-15 Marek Safar <marek.safar@seznam.cz>
Fixed bug #59980, #64224
* expression.cs (Invocation.DoResolve): Fixed error CS0571 test.
* typemanager.cs (IsSpecialMethod): Simplified
2004-09-14 Marek Safar <marek.safar@seznam.cz>
* decl.cs (MemberCore.Emit): Resuscitated VerifyObsoleteAttribute
condition with better params.
2004-09-14 Marek Safar <marek.safar@seznam.cz>
Fixed bug #65238
* attribute.cs (Resolve): Property has to have both
accessors.
2004-09-14 Martin Baulig <martin@ximian.com>
* decl.cs (MemberCore.Emit): Always call VerifyObsoleteAttribute().
2004-09-14 Marek Safar <marek.safar@seznam.cz>
Fixed bug #61902
* codegen.cs (TestObsoleteMethodUsage): Trace when method is
called and is obsolete then this member suppress message
when call is inside next [Obsolete] method or type.
* expression.cs: Use TestObsoleteMethodUsage member.
2004-09-14 Martin Baulig <martin@ximian.com>
* cs-parser.jay: Sync a bit with the GMCS version.
2004-09-14 Martin Baulig <martin@ximian.com>
* cs-parser.jay (CSharpParser): Don't derive from GenericsParser.
(CSharpParser.yacc_verbose_flag): New public field.
* genericparser.cs: Removed.
2004-09-14 Raja R Harinath <rharinath@novell.com>
* cs-parser.jay (event_declaration): Re-enable cs0071 error.
2004-09-13 Marek Safar <marek.safar@seznam.cz>
* class.cs (MethodCore.CheckBase): Fix bug #65757.
2004-09-10 Martin Baulig <martin@ximian.com>
Backported my MemberName changes from GMCS into MCS.
- we are now using a special `MemberName' class instead of using
strings; in GMCS, the `MemberName' also contains the type
arguments.
- changed the grammar rules a bit:
* the old `member_name' is now a `namespace_or_type_name':
The rule is that we use `namespace_or_type_name' everywhere
where we expect either a "member name" (GetEnumerator) or a
"member name" with an explicit interface name
(IEnumerable.GetEnumerator).
In GMCS, the explicit interface name may include type arguments
(IEnumerable<T>.GetEnumerator).
* we use `member_name' instead of just `IDENTIFIER' for
"member names":
The rule is that we use `member_name' wherever a member may
have type parameters in GMCS.
* decl.cs (MemberName): New public class.
(MemberCore.MemberName): New public readonly field.
(MemberCore.ctor): Take a `MemberName' argument, not a string.
(DeclSpace): Likewise.
* delegate.cs (Delegate.ctor): Take a MemberName, not a string.
* enum.cs (Enum.ctor): Likewise.
* namespace.cs (AliasEntry.Alias): Changed type from Expression to
MemberName.
(AliasEntry.ctor): Take a MemberName, not an Expression.
(AliasEntry.UsingAlias): Likewise.
* class.cs (TypeContainer.ctor): Take a MemberName, not a string.
(IMethodData.MemberName): Changed type from string to MemberName.
(MemberBase.ExplicitInterfaceName): Likewise.
(AbstractPropertyEventMethod.SetupName): Make this private.
(AbstractPropertyEventMethod.ctor): Added `string prefix'
argument; compute the member name here.
(AbstractPropertyEventMethod.UpdateName): Recompute the name based
on the `member.MemberName' and the `prefix'.
* cs-parser.jay (attribute_name): Use `namespace_or_type_name',
not `type_name'.
(struct_declaration): Use `member_name' instead of `IDENTIFIER';
thus, we get a `MemberName' instead of a `string'. These
declarations may have type parameters in GMCS.
(interface_method_declaration, delegate_declaration): Likewise.
(class_declaration, interface_declaration): Likewise.
(method_header): Use `namespace_or_type_name' instead of
`member_name'. We may be an explicit interface implementation.
(property_declaration, event_declaration): Likewise.
(member_name): This is now just an `IDENTIFIER', not a
`namespace_or_type_name'.
(type_name, interface_type): Removed.
(namespace_or_type_name): Return a MemberName, not an Expression.
(primary_expression): Use `member_name' instead of `IDENTIFIER';
call GetTypeExpression() on the MemberName to get an expression.
(IndexerDeclaration.interface_type): Changed type from string to
MemberName.
(MakeName): Operate on MemberName's instead of string's.
2004-09-13 Raja R Harinath <rharinath@novell.com>
Fix bug #55770.
* namespace.cs (AliasEntry.Resolve): Implement section 16.3.1.
(NamespaceEntry.Lookup): Add new argument to flag if we want the
lookup to avoid symbols introduced by 'using'.
* rootcontext.cs (NamespaceLookup): Update.
2004-09-12 Marek Safar <marek.safar@seznam.cz>
* class.cs (TypeContainer.DoDefineMembers): Do not call
DefineDefaultConstructor for static classes.
2004-09-12 Marek Safar <marek.safar@seznam.cz>
* attribute.cs (Attribute.Resolve): Add error 653 report.
* class.cs (Class.ApplyAttributeBuilder): Add error 641
report.
(Method.ApplyAttributeBuilder): Add error 685 report.
(Operator.Define): Add error 564 report.
* cs-tokenizer.cs (handle_hex): Add error 1013 report.
* expression.cs (Invocation.DoResolve): Add error
245 and 250 report.
* parameter.cs (Parameter.ApplyAttributeBuilder): Add
error 674 report.
2004-09-11 Marek Safar <marek.safar@seznam.cz>
* class.cs (ConstructorInitializer.Resolve):
Wrong error number (515->516).
2004-09-11 Marek Safar <marek.safar@seznam.cz>
* class.cs (Indexer.Define): Add error 631 report.
2004-09-11 Marek Safar <marek.safar@seznam.cz>
* ecore.cs (Error_NegativeArrayIndex): Fix 248 error.
2004-09-11 Marek Safar <marek.safar@seznam.cz>
* expression.cs (Probe.DoResolve): Add error CS0241 report.
2004-09-10 Marek Safar <marek.safar@seznam.cz>
* cs-parser.jay: Added error CS0241 report.
2004-09-10 Raja R Harinath <rharinath@novell.com>
* cs-parser.jay (fixed_statement): Introduce a scope for the
declaration in the 'fixed' statement.
2004-09-09 Marek Safar <marek.safar@seznam.cz>
* cs-parser.jay: Added CS0230 error report.
2004-09-09 Marek Safar <marek.safar@seznam.cz>
* cs-parser.jay: Added errors CS0231 and CS0257 report.
2004-09-09 Marek Safar <marek.safar@seznam.cz>
* expression.cs (Argument.Resolve): Added error CS0192 and
CS0199 report.
2004-09-09 Marek Safar <marek.safar@seznam.cz>
C# 2.0 #pragma warning feature
* cs-tokenizer.cs (PreProcessPragma): New method;
Handles #pragma directive.
* report.cs (WarningRegions): New class; Support
class for #pragma warning directive. It tests whether
warning is enabled for a given line.
2004-09-08 Miguel de Icaza <miguel@ximian.com>
* const.cs: Add more descriptive error report, tahnks to
Sebastien.
2004-09-08 Marek Safar <marek.safar@seznam.cz>
* ecore.cs (FieldExpr.DoResolveLValue): Fixed CS0198 report.
2004-09-07 Miguel de Icaza <miguel@ximian.com>
* expression.cs: Apply patch from Ben: Remove dead code from
ArrayCreation, and remove the TurnintoConstant call in const.cs,
as that code just threw an exception anwyays.
* const.cs: Remove the call to the turnintoconstant, for details
see bug: #63144
* literal.cs: The type of the null-literal is the null type; So
we use a placeholder type (literal.cs:System.Null, defined here)
for it.
* expression.cs (Conditional.DoResolve): Remove some old code that
is no longer needed, conversions have been fixed.
(ArrayCreationExpression.DoResolve): Return false if we fail to
resolve the inner expression.
2004-09-07 Raja R Harinath <rharinath@novell.com>
Fix test-290.cs.
* cs-parser.jay (delegate_declaration): Record a delegate
declaration as a type declaration.
Reported by Jo Vermeulen <jo@lumumba.luc.ac.be>.
2004-09-06 Miguel de Icaza <miguel@ximian.com>
* parameter.cs: Do not crash if the type can not be resolved.
* expression.cs: Report errors with unsafe pointers, fixes #64896
2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
* expression.cs: Pointer arith always needs to do a conv.i
if the operand is a long. fix 65320
2004-09-04 Marek Safar <marek.safar@seznam.cz>
Fixed cs0619-37.cs, cs0619-38.cs
* enum.cs (GetObsoleteAttribute): Removed.
* expression.cs (MemberAccess.DoResolve): Test for [Obsolete]
on Enum member is double staged. The first is tested member
and then enum.
2004-09-04 Marek Safar <marek.safar@seznam.cz>
Fixed #56986, #63631, #65231
* class.cs: (TypeContainer.AddToMemberContainer): New method,
adds member to name container.
(TypeContainer.AddToTypeContainer): New method, adds type to
name container.
(AddConstant, AddEnum, AddClassOrStruct, AddDelegate, AddMethod,
AddConstructor, AddInterface, AddField, AddProperty, AddEvent,
AddOperator): Simplified by reusing AddToMemberContainer.
(TypeContainer.UserDefinedStaticConstructor): Changed to property
instead of field.
(Method.CheckForDuplications): Fixed implementation to test all
possibilities.
(MemberBase): Detection whether member is explicit interface
implementation is now in constructor.
(MemberBase.UpdateMemberName): Handles IndexerName.
(Accessor): Changed to keep also location information.
(AbstractPropertyEventMethod): Is derived from MemberCore.
(AbstractPropertyEventMethod.IsDummy): Says whether accessor
will be emited or not.
(PropertyBase.AreAccessorsDuplicateImplementation):
Tests whether accessors are not in collision with some method.
(Operator): Is derived from MethodCore to simplify common
operations.
* decl.cs (Flags.TestMethodDuplication): Test for duplication
must be performed.
(DeclSpace.AddToContainer): Adds the member to defined_names
table. It tests for duplications and enclosing name conflicts.
* enum.cs (EnumMember): Clean up to reuse the base structures
2004-09-03 Martin Baulig <martin@ximian.com>
* class.cs (TypeContainer.DefineDefaultConstructor): Put this back
into TypeContainer, to make partial classes work again.
2004-09-03 Martin Baulig <martin@ximian.com>
* rootcontext.cs (RootContext.V2): Removed.
2004-03-23 Martin Baulig <martin@ximian.com>
* expression.cs (Invocation.OverloadResolve): Added `bool
may_fail' argument and use it instead of the Location.IsNull() hack.
2004-09-03 Martin Baulig <martin@ximian.com>
Merged latest changes into gmcs. Please keep this comment in
here, it makes it easier for me to see what changed in MCS since
the last time I merged.
2004-09-03 Raja R Harinath <rharinath@novell.com>
Fix #61128.
* expression.cs (BetterConversion): Don't allow either conversion
to be null. Remove redundant implicit conversion test when 'q ==
null' -- when this function is invoked, we already know that the
implicit conversion exists.
(BetterFunction): Assume that 'best' is non-null. Remove
redundant reimplementation of IsApplicable when 'best' is null.
(IsParamsMethodApplicable, IsApplicable): Add new parameter for
number of arguments.
(IsAncestralType): Extract from OverloadResolve.
(OverloadResolve): Make robust to the MethodGroupExpr being
unsorted. Implement all the logic of Section 14.5.5.1, and
support overloading of methods from multiple applicable types.
Clean up logic somewhat. Don't pass null methods to BetterFunction.
* report.cs (SymbolRelatedToPreviousError): Cleanup output.
(RealError, Warning): Append type of report to related symbol.
2004-09-03 Marek Safar <marek.safar@seznam.cz>
* enum.cs: Fixed CLS-Compliance checks for enum members.
Error tests cs3008-8.cs, cs3014-8.cs
2004-09-02 Marek Safar <marek.safar@seznam.cz>
Fixed bug #62342, #63102
* class.cs: ImplementIndexer uses member.IsExplicitImpl
like ImplementMethod.
2004-09-02 Marek Safar <marek.safar@seznam.cz>
* attribute.cs (Attribute.GetAttributeArgumentExpression):
Fixed bug #65170.
2004-09-02 Martin Baulig <martin@ximian.com>
* statement.cs (Using.EmitLocalVariableDeclFinally): Use
TypeManager.GetArgumentTypes() rather than calling GetParameters()
on the MethodBase.
2004-09-01 Marek Safar <marek.safar@seznam.cz>
C# 2.0 Static classes implemented
* class.cs (TypeContainer): instance_constructors,
initialized_fields, initialized_static_fields,
default_constructor, base_inteface_types are protected to be
accessible from StaticClass.
(TypeContainer.DefineDefaultConstructor): New virtual method
for custom default constructor generating
(StaticClass): New class to handle "Static classes" feature.
* cs-parser.jay: Handle static keyword on class like instance
of StaticClass.
* driver.cs: Added "/langversion" command line switch with two
options (iso-1, default).
2004-08-31 Marek Safar <marek.safar@seznam.cz>
* ecore.cs (FieldExpr.Resolve): Fixed bug #64689.
2004-08-31 Miguel de Icaza <miguel@ximian.com>
* delegate.cs: Style.
2004-08-31 Ben Maurer <bmaurer@users.sourceforge.net>
* delegate.cs: Add seperate instance expr field for miguel.
2004-08-29 Ben Maurer <bmaurer@users.sourceforge.net>
* PointerArithmetic (Resolve): make sure we are not doing
pointer arith on void*. Also, make sure we are resolved
by not setting eclass until resolve.
All callers: Make sure that PointerArithmetic gets resolved.
2004-08-29 Ben Maurer <bmaurer@users.sourceforge.net>
* ArrayCreation (LookupType): If the type does not resolve
to an array, give an error.
2004-08-27 Marek Safar <marek.safar@seznam.cz>
* statement.cs (Try.Resolve): Fixed bug #64222
2004-08-27 Martin Baulig <martin@ximian.com>
* class.cs
(TC.OperatorArrayList.OperatorEntry.CheckPairedOperators): Don't
crash here.
2004-08-26 Marek Safar <marek.safar@seznam.cz>
* ecore.cs (Constantify): Get underlying type via
System.Enum.GetUnderlyingType to avoid StackOverflow on the
Windows in special cases.
2004-08-26 Marek Safar <marek.safar@seznam.cz>
* typemanager.cs (GetAddMethod): Used GetAddMethod (true)
for obtaining also private methods.
(GetRemoveMethod): Used GetRemoveMethod (true)
for obtaining also private methods.
2004-08-24 Martin Baulig <martin@ximian.com>
* class.cs (Method.Define): Set MethodAttributes.SpecialName and
MethodAttributes.HideBySig for operators.
2004-08-23 Martin Baulig <martin@ximian.com>
Back to the old error reporting system :-)
* report.cs (Message): Removed.
(Report.MessageData, ErrorData, WarningData): Removed.
(Report.Error, Warning): Back to the old system.
2004-08-23 Martin Baulig <martin@ximian.com>
* decl.cs (IMemberContainer.Parent): Renamed to ParentContainer.
* class.cs (TypeContainer.ParentContainer): New public virtual
method; replaces the explicit interface implementation.
(ClassPart.ParentContainer): Override.
2004-08-23 Martin Baulig <martin@ximian.com>
* statement.cs (Switch): Added support for constant switches; see
#59428 or test-285.cs.
2004-08-22 Marek Safar <marek.safar@seznam.cz>
Fixed bug #62740.
* statement.cs (GetEnumeratorFilter): Removed useless
logic because C# specs is strict. GetEnumerator must be
public.
2004-08-22 Martin Baulig <martin@ximian.com>
* flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
a switch and may break, reset the barrier. Fixes #59867.
2004-08-22 Marek Safar <marek.safar@seznam.cz>
CLS-Compliance speed up (~5% for corlib)
* attribute.cs (AttributeTester.VerifyTopLevelNameClsCompliance):
New method. Tests container for CLS-Compliant names
* class.cs (TypeContainer.VerifyClsName): New method.
Checks whether container name is CLS Compliant.
(Constructor): Implements IMethodData.
* decl.cs (MemberCache.GetPublicMembers ): New method. Builds
low-case table for CLS Compliance test.
(MemberCache.VerifyClsParameterConflict): New method.
Checks method parameters for CS3006 error.
* enum.cs (EnumMember): Is derived from MemberCore.
(Enum.VerifyClsName): Optimized for better performance.
2004-08-06 Marek Safar <marek.safar@seznam.cz>
* report.cs: Renamed Error_T to Error and changed all
references.
2004-08-06 Marek Safar <marek.safar@seznam.cz>
* class.cs (TypeContainer.IndexerArrayList): New inner class
container for indexers.
(TypeContainer.DefaultIndexerName): New constant for default
indexer name. Replaced all "Item" with this constant.
(TypeContainer.DefineIndexers): Moved to IndexerArrayList class.
* typemanager.cs (TypeManager.default_member_ctor): Cache here
DefaultMemberAttribute constructor.
2004-08-05 Martin Baulig <martin@ximian.com>
* flowanalysis.cs (FlowBranching.UsageVector.MergeJumpOrigins):
Fix bug #59429.
2004-08-05 Marek Safar <marek.safar@seznam.cz>
* mcs.exe.sources: $(EXTRA_SOURCES) are now here to avoid
multi platforms problem.
* compiler.csproj: Included shared files.
2004-08-04 Marek Safar <marek.safar@seznam.cz>
Fix bug 60333, 55971 in the more general way
* attribute.cs (Attribute.GetAttributeArgumentExpression):
Added arg_type argument for constant conversion.
(Attribute.Resolve): Reuse GetAttributeArgumentExpression.
2004-08-04 Marek Safar <marek.safar@seznam.cz>
Fix bug #59760
* class.cs (TypeContainer ): New inner classes MethodArrayList,
OperatorArrayList, MethodCoreArrayList for typecontainer
containers. Changed class member types to these new types.
(MethodArrayList.DefineMembers): Added test for CS0659.
2004-08-04 Miguel de Icaza <miguel@ximian.com>
* cfold.cs: Synchronize the folding with the code in expression.cs
Binary.DoNumericPromotions for uint operands.
* attribute.cs: Revert patch from Raja, it introduced a regression
while building Blam-1.2.1 (hard to isolate a test case).
2004-08-04 Marek Safar <marek.safar@seznam.cz>
Fix for #55382
* class.cs:
(TypeContainer.Define): Renamed to DefineContainerMembers because of
name collision.
(MethodCore.parent_method): New member. The method we're overriding
if this is an override method.
(MethodCore.CheckBase): Moved from Method class and made common.
(MethodCore.CheckMethodAgainstBase): Moved from MemberBase and made
private.
(MethodCore.CheckForDuplications): New abstract method. For custom
member duplication search in a container
(MethodCore.FindOutParentMethod): New abstract method. Gets parent
method and its return type.
(Event.conflict_symbol): New member. Symbol with same name in the
parent class.
* decl.cs:
(MemberCache.FindMemberWithSameName): New method. The method
is looking for conflict with inherited symbols.
2004-08-04 Martin Baulig <martin@ximian.com>
* codegen.cs (VariableStorage.EmitLoadAddress): New public method.
* statement.cs (Foreach.EmitFinally): Make this work for valuetypes.
2004-08-03 Marek Safar <marek.safar@seznam.cz>
* report.cs (Message): New enum for better error, warning reference in
the code.
(MessageData): New inner abstract class. It generally handles printing of
error and warning messages.
Removed unused Error, Warning, Message methods.
2004-08-03 Marek Safar <marek.safar@seznam.cz>
Fix for cs0592-8.cs test
* attribute.cs
(Attributable.ValidAttributeTargets): Made public.
(Attribute.ExplicitTarget): New member for explicit target value.
(Attribute.CheckTargets): Now we translate explicit attribute
target to Target here.
2004-08-03 Ben Maurer <bmaurer@ximian.com>
* ecore.cs (MethodGroupExpr): new IsBase property.
* expression.cs (BaseAccess): Set IsBase on MethodGroupExpr.
* delegate.cs (DelegateCreation): store a MethodGroupExpr
rather than an instance expr.
(DelegateCreation.Emit): Use the method group rather than
the instance expression. Also, if you have base.Foo as the
method for a delegate, make sure to emit ldftn, not ldftnvirt.
(ResolveMethodGroupExpr): Use the MethodGroupExpr.
(NewDelegate.DoResolve): Only check for the existance of Invoke
if the method is going to be needed. Use MethodGroupExpr.
(NewDelegate.Emit): Remove, DelegateCreation implements this.
* expression.cs: For pointer arith., make sure to use
the size of the type, not the size of the pointer to
the type.
2004-08-03 Marek Safar <marek.safar@seznam.cz>
Fix for #60722
* class.cs (Class): Added error CS0502 test.
2004-08-03 John Luke <jluke@cfl.rr.com>
Raja R Harinath <rharinath@novell.com>
Fix for #60997.
* attribute.cs (Attribute.complained_before): New flag.
(Attribute.ResolveType, Attribute.Resolve),
(Attribute.DefinePInvokeMethod): Set it.
(Attributes.Search): Pass 'complain' to Attribute.ResolveType.
2004-08-03 Martin Baulig <martin@ximian.com>
* expression.cs (Binary.ResolveOperator): Don't abort if we can't
use a user-defined operator; we still need to do numeric
promotions in case one argument is a builtin type and the other
one has an implicit conversion to that type. Fixes #62322.
2004-08-02 Martin Baulig <martin@ximian.com>
* statement.cs (LocalInfo.Flags): Added `IsThis'.
(LocalInfo.IsThis): New public property.
(Block.EmitMeta): Don't create a LocalBuilder for `this'.
2004-08-01 Martin Baulig <martin@ximian.com>
* class.cs (TypeContainer.GetClassBases): Don't set the default
here since we may get called from GetPartialBases().
(TypeContainer.DefineType): If GetClassBases() didn't return a
parent, use the default one.
2004-07-30 Duncan Mak <duncan@ximian.com>
* Makefile (mcs2.exe, mcs3.exe): add $(EXTRA_SOURCES).
2004-07-30 Martin Baulig <martin@ximian.com>
* Makefile (EXTRA_SOURCES): List the symbol writer's sources here.
* class.cs (SourceMethod): New public class, derive from the
symbol writer's ISourceMethod.
(Method): Use the new symbol writer API.
* codegen.cs (CodeGen.InitializeSymbolWriter): Take the filename
as argument and use the new symbol writer.
* location.cs
(SourceFile): Implement the symbol writer's ISourceFile.
(Location.SymbolDocument): Removed.
(Location.SourceFile): New public property.
* symbolwriter.cs: Use the new symbol writer API.
2004-07-30 Raja R Harinath <rharinath@novell.com>
* Makefile (install-local): Remove. Functionality moved to
executable.make.
2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
* Makefile: Install mcs.exe.config file together with mcs.exe.
* mcs.exe.config: Added supportedRuntime entry to make sure it runs in the
correct runtime version.
2004-07-25 Martin Baulig <martin@ximian.com>
* class.cs
(TypeContainer.RegisterOrder): Removed, this was unused.
(TypeContainer, interface_order): Removed.
(TypeContainer.AddClass, AddStruct, AddInterface): Take a
TypeContainer as argument since we can also be called with a
`PartialContainer' for a partial class/struct/interface.
(TypeContainer.IsInterface): Use `Kind == Kind.Interface' instead
of checking whether we're an `Interface' - we could be a
`PartialContainer'.
(PartialContainer.Register): Override; call
AddClass()/AddStruct()/AddInterface() on our parent.
* cs-parser.jay (interface_member_declaration): Add things to the
`current_container', not the `current_class'.
* rootcontext.cs (RegisterOrder): The overloaded version which
takes an `Interface' was unused, removed.
* typemanager.cs (TypeManager.LookupInterface): Return a
`TypeContainer', not an `Interface'.
(TypeManager.IsInterfaceType): The `builder_to_declspace' may
contain a `PartialContainer' for an interface, so check it's
`Kind' to figure out what it is.
2004-07-25 Martin Baulig <martin@ximian.com>
* class.cs (Class.DefaultTypeAttributes): New public constant.
(Struct.DefaultTypeAttributes): Likewise.
(Interface.DefaultTypeAttributes): Likewise.
(PartialContainer.TypeAttr): Override this and add the
DefaultTypeAttributes.
2004-07-25 Martin Baulig <martin@ximian.com>
* decl.cs (DeclSpace.Emit): Removed the `TypeContainer' argument,
we can just use the `Parent' field instead.
2004-07-25 Martin Baulig <martin@ximian.com>
* class.cs (TypeContainer.Emit): Renamed to EmitType().
2004-07-25 Martin Baulig <martin@ximian.com>
* class.cs (TypeContainer.DefineMembers): Call DefineMembers() on
our parts before defining any methods.
(TypeContainer.VerifyImplements): Make this virtual.
(ClassPart.VerifyImplements): Override and call VerifyImplements()
on our PartialContainer.
2004-07-25 Martin Baulig <martin@ximian.com>
* iterators.cs (Iterator.Define): Renamed to DefineIterator().
* decl.cs (DeclSpace.Define): Removed the `TypeContainer'
argument, we can just use the `Parent' field instead.
* class.cs
(MemberBase.CheckBase): Removed the `TypeContainer' argument.
(MemberBase.DoDefine): Likewise.
2004-07-24 Martin Baulig <martin@ximian.com>
* decl.cs (MemberCore.Parent): New public field.
(DeclSpace.Parent): Moved to MemberCore.
* class.cs (MethodCore.ds): Removed; use `Parent' instead.
(MemberBase.ctor): Added TypeContainer argument, pass it to our
parent's .ctor.
(FieldBase, Field, Operator): Likewise.
(EventProperty.ctor): Take a TypeContainer instead of a DeclSpace.
(EventField, Event): Likewise.
2004-07-23 Martin Baulig <martin@ximian.com>
* class.cs (PartialContainer): New public class.
(ClassPart): New public class.
(TypeContainer): Added support for partial classes.
(TypeContainer.GetClassBases): Splitted some of the functionality
out into GetNormalBases() and GetPartialBases().
* cs-tokenizer.cs (Token.PARTIAL): New token.
(Tokenizer.consume_identifier): Added some hacks to recognize
`partial', but only if it's immediately followed by `class',
`struct' or `interface'.
* cs-parser.jay: Added support for partial clases.
2004-07-23 Martin Baulig <martin@ximian.com>
* class.cs (MethodCore.ds): Made this a `TypeContainer' instead of
a `DeclSpace' and also made it readonly.
(MethodCore.ctor): Take a TypeContainer instead of a DeclSpace.
(Method.ctor, Constructor.ctor, Destruktor.ctor): Likewise.
(PropertyBase.ctor, Property.ctor, Indexer.ctor): Likewise.
* cs-parser.jay: Pass the `current_class', not the
`current_container' (at the moment, this is still the same thing)
to a new Method, Property, Event, Indexer or Constructor.
2004-07-23 Martin Baulig <martin@ximian.com>
* cs-parser.jay (CSharpParser): Added a new `current_class' field
and removed the `current_interface' one.
(struct_declaration, class_declaration, interface_declaration):
Set `current_class' to the newly created class/struct/interface;
set their `Bases' and call Register() before parsing their body.
2004-07-23 Martin Baulig <martin@ximian.com>
* class.cs (Kind): New public enum.
(TypeContainer): Made this class abstract.
(TypeContainer.Kind): New public readonly field.
(TypeContainer.CheckDef): New public method; moved here from
cs-parser.jay.
(TypeContainer.Register): New public abstract method.
(TypeContainer.GetPendingImplementations): New public abstract
method.
(TypeContainer.GetClassBases): Removed the `is_class' and
`is_iface' parameters.
(TypeContainer.DefineNestedTypes): Formerly known as
DoDefineType().
(ClassOrStruct): Made this class abstract.
* tree.cs (RootTypes): New public type.
2004-07-20 Martin Baulig <martin@ximian.com>
* tree.cs (Tree.RecordNamespace): Removed.
(Tree.Namespaces): Removed.
* rootcontext.cs (RootContext.IsNamespace): Removed.
* cs-parser.jay (namespace_declaration): Just create a new
NamespaceEntry here.
2004-07-20 Martin Baulig <martin@ximian.com>
* statement.cs (ExceptionStatement): New abstract class. This is
now used as a base class for everyone who's using `finally'.
(Using.ResolveLocalVariableDecls): Actually ResolveLValue() all
our local variables before using them.
* flowanalysis.cs (FlowBranching.StealFinallyClauses): New public
virtual method. This is used by Yield.Resolve() to "steal" an
outer block's `finally' clauses.
(FlowBranchingException): The .ctor now takes an ExceptionStatement
argument.
* codegen.cs (EmitContext.StartFlowBranching): Added overloaded
version which takes an ExceptionStatement. This version must be
used to create exception branchings.
* iterator.cs
(Yield.Resolve): "Steal" all `finally' clauses from containing blocks.
(Iterator.EmitMoveNext): Added exception support; protect the
block with a `fault' clause, properly handle 'finally' clauses.
(Iterator.EmitDispose): Run all the `finally' clauses here.
2004-07-20 Martin Baulig <martin@ximian.com>
* iterator.cs: This is the first of a set of changes in the
iterator code. Match the spec more closely: if we're an
IEnumerable, then GetEnumerator() must be called. The first time
GetEnumerator() is called, it returns the current instance; all
subsequent invocations (if any) must create a copy.
2004-07-19 Miguel de Icaza <miguel@ximian.com>
* expression.cs: Resolve the constant expression before returning
it.
2004-07-19 Martin Baulig <martin@ximian.com>
* iterators.cs (Iterator.MapVariable): Don't define fields twice.
(Iterator.MoveNextMethod.DoEmit): Use `TypeManager.int32_type' as
the return type of the new EmitContext.
2004-07-18 Martin Baulig <martin@ximian.com>
* class.cs (Property.Define): Fix iterators.
* iterators.cs (Iterator.Define): Moved the
`container.AddInterator (this)' call here from the .ctor; only do
it if we resolved successfully.
2004-07-17 Miguel de Icaza <miguel@ximian.com>
* cs-tokenizer.cs (handle_preprocessing_directive): Do not return
`true' for preprocessing directives that we parse. The return
value indicates whether we should return to regular tokenizing or
not, not whether it was parsed successfully.
In the past if we were in: #if false ... #line #endif, we would
resume parsing after `#line'. See bug 61604.
* typemanager.cs: Removed an old hack from Gonzalo to get corlib
building: IsEnumType should return true only for enums, not for
enums or System.Enum itself. This fixes #61593.
Likely what happened is that corlib was wrong: mcs depended on
this bug in some places. The bug got fixed, we had to add the
hack, which caused bug 61593.
* expression.cs (ArrayAccess.GetStoreOpCode): Remove an old hack
that was a workaround for the older conditions.
2004-07-16 Ben Maurer <bmaurer@ximian.com>
* assign.cs: IAssignMethod has a new interface, as documented
inline. All assignment code now uses this new api.
* ecore.cs, expression.cs: All classes which implement
IAssignMethod now use the new interface.
* expression.cs (Invocation): add a hack to EmitCall so that
IndexerAccess can be the target of a compound assignment without
evaluating its arguments twice.
* statement.cs: Handle changes in Invocation api.
2004-07-16 Martin Baulig <martin@ximian.com>
* iterators.cs: Rewrote this. We're now using one single Proxy
class for both the IEnumerable and the IEnumerator interface and
`Iterator' derives from Class so we can use the high-level API.
* class.cs (TypeContainer.AddIterator): New method.
(TypeContainer.DoDefineType): New protected virtual method, which
is called from DefineType().
(TypeContainer.DoDefineMembers): Call DefineType() and
DefineMembers() on all our iterators.
(TypeContainer.Emit): Call Emit() on all our iterators.
(TypeContainer.CloseType): Call CloseType() on all our iterators.
* codegen.cs (EmitContext.CurrentIterator): New public field.
2004-07-15 Martin Baulig <martin@ximian.com>
* typemanager.cs
(TypeManager.not_supported_exception_type): New type.
2004-07-14 Martin Baulig <martin@ximian.com>
* iterators.cs: Use real error numbers.
2004-07-14 Martin Baulig <martin@ximian.com>
* iterator.cs (IteratorHandle.IsIEnumerable): The spec explicitly
requires this to be a System.Collection.IEnumerable and not a
class implementing that interface.
(IteratorHandle.IsIEnumerator): Likewise, for IEnumerator.
2004-07-13 Marek Safar <marek.safar@seznam.cz>
* class.cs: Fixed previous fix, it broke some error tests.
2004-07-12 Martin Baulig <martin@ximian.com>
* enum.cs (Enum.Define): Call Emit() to emit the attributes.
Fixes #61293.
2004-07-09 Miguel de Icaza <miguel@ximian.com>