/
ChangeLog
24950 lines (17051 loc) · 851 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
2007-02-12 Marek Safar <marek.safar@gmail.com>
A fix for bug #80749
* assign.cs (FieldInitializer): FieldInitializer has to keep track of
its parent container.
* class.cs (DefineFieldInitializers): Each initializer can has different
resolve context.
2007-01-27 Raja R Harinath <rharinath@novell.com>
Fix #80358
* decl.cs (DeclSpace.initialize_type_params): Don't access
'type_params' of a partial class directly.
2007-01-25 Marek Safar <marek.safar@gmail.com>
* expression.cs (CheckUselessComparison): Add additional check for char
constants.
* namespace.cs: Fixed typo.
2007-01-23 Miguel de Icaza <miguel@novell.com>
* constant.cs: Bloat removal, CheckRange and CheckUnsigned are
gone, instead we inline the test, preventing the needless casts to
longs, ulongs and doubles for the parameters, avoiding calls to
methods that overchecked stuff, and instead inlined things
nicely.
2007-01-20 Marek Safar <marek.safar@gmail.com>
* cs-parser.jay: Better parameter error handling.
2007-01-17 Marek Safar <marek.safar@gmail.com>
A fix for bug #80368, #80522
* expression.cs (ArrayCreation.only_constant_initializers): Indicates
whether array initializer contains constants only.
(ArrayCreation.Emit): Use better formula to decide when
are array initializers for static initialization.
(ArrayCreation.EmitDynamicInitializers): When the array is small enough we
have to emit even constants otherwise they are pre-initialized.
2007-01-17 Bill Holmes <bill.holmes@ansys.com>
Raja R Harinath <rharinath@novell.com>
Fix emit order of 'get' vs. 'set'.
* support.cs (Accessors): New.
* cs-parser.jay (accessor_declarations): Use it instead of 'Pair'.
Note the order in which accessors are declared in the source.
* class.cs (PropertyBase.DefineGet, PropertyBase.DefineSet): New.
Refactored from Property.Define and Indexer.Define.
(PropertyBase.DefineAccessors): New helper that calls the above in
appropriate order as noted by the parser.
(Property.Define, Indexer.Define): Update to changes.
(PropertyBase.SetMethod.PropertyInfo): Don't return a null.
2007-01-17 Raja R Harinath <rharinath@novell.com>
Fix cs0029-6.cs and gcs0029-2.cs (regression)
* ecore.cs (EmptyConstantCast.ConvertImplicitly): Check that
there's an implicit conversion from the current type to the target
type before converting the underlying constant.
2007-01-16 Marek Safar <marek.safar@gmail.com>
* const.cs (ResolveValue): Updated after constant conversion was made more
generic.
* constant.cs (GetAttributableValue): constant to object conversion is
used for attributes only.
(IntConstant.ConvertImplicitly): Moved from convert to be used in all
constant conversions.
(LongConstant.ConvertImplicitly): Ditto.
* convert.cs (ImplicitNumericConversion): Extracted constant bussiness.
(ImplicitConversionStandard): Handle constant conversion as extra step.
It solves the issue when constant conversion was called indirectly like
inside array initializer and constant folding was skipped.
* literal.cs (NullLiteral.ConvertImplicitly): Fixed an issue exposed by
this change.
* statement.cs(ImplicitConversionStandard): Updated after constant
conversion was made more generic.
2007-01-16 Sergey P. Kondratyev <se@unicom.tomica.ru>
* expression.cs (As.DoResolve): Use GenericConstraints instead of
Constraints, solves the problem where the compiler incorrectly
reported that a type parameter was not constrained to a class (Bug
80518)
2007-01-14 Marek Habersack <grendello@gmail.com>
* doc-bootstrap.cs: Fix a compilation problem in the bootstrap phase.
2007-01-14 Marek Safar <marek.safar@gmail.com>
A fix for bug #80368
* assign.cs (FieldInitializer): New class implements field
initializer statement.
* attribute.cs: Update after FieldMember rename.
* class.cs (PropertyBasedMember): New common class for property based
types.
(InterfaceMemberBase): New base class for all members which can be used as
an interface members.
(MethodCore): Moved really common code to InterfaceMemberBase.
(Method.Define): Equal and GetHasCode detection is relevant for methods
only.
(MethodData.Define): Don't assume that public event implements an
interface automatically.
(MethodData.DefineMethodBuilder): Issue an error even if only extern
modifier is used.
(MemberBase): Moved all interface speficic code to InterfaceMemberBase.
(FieldMember): Merged with FieldBase.
(EventProperty.AEventPropertyAccessor): New specialization to check whether
event extern modifier can be used.
(EventField.EventFieldAccessor): Moved event field specific code here.
(Event.AllowedModifiers): Even event can be extern.
(Event.FindOutBaseMethod): New override specific to events.
(Indexer.parameters): Reintroduce parameters because base class holds
only properties common data.
(Indexer.CheckForDuplications): Indexers are threated as methods so we
need do extra parameters check.
* const.cs: Update after FieldMember rename.
* decl.cs (MemberCache.FindBaseEvent): New method.
* doc.cs (GetMethodDocCommentName): Accept parameters as extra argument
to reflect that indexer is now derived from PropertyBased.
* ecore.cs (GetMemberType): Made public.
(EventExpr.ResolveMemberAccess): Use right event cache and checks for
obsolete event.
* flowanalysis.cs, statement.cs: Update after FieldMember rename.
* typemanager.cs (CSharpSignature): Correctly print event accessors.
(RegisterEvent): Removed.
(RegisterPrivateFieldOfEvent): Renamed to RegisterEventField.
(GetPrivateFieldOfEvent): Renamed to GetEventField.
2007-01-11 Raja R Harinath <rharinath@novell.com>
Fix #80249
* statement.cs (CollectionForeach.TryType): Prefer generic
GetEnumerator over non-generic variant. Fix code to follow comments.
2007-01-09 Raja R Harinath <rharinath@novell.com>
Fix #80446
* support.cs (ReflectionParameter): Don't use an invalid index on
the generic parameter data.
2007-01-08 Miguel de Icaza <miguel@novell.com>
* driver.cs: Just add a tiny bit of infrastructure.
2007-01-02 Marek Safar <marek.safar@gmail.com>
* class.cs (VerifyMembers): Fixed an crash reported on mono mailing list
where field type is struct from current assembly.
* ecore.cs (EnumConstant.AsString): Report an enum member name whenever
it is possible.
2007-01-02 Marek Safar <marek.safar@gmail.com>
A fix for bug #80381
* attribute.cs (AttributeTester.RegisterNonObsoleteType): Registers
the core types.
* namespace.cs (GlobalRootNamespace.LookupTypeReflection): Better error
messages.
(Namespace.LookupType): Always use core types from corlib when speficied.
* report.cs: A new warning.
* rootcontext.cs (BootstrapCorlib_ResolveInterface,
BootstrapCorlib_ResolveClass): Register type as non-obsolete type.
(ResolveCore): Add missing System.Runtime.InteropServices._Attribute.
* typemanager.cs (CoreLookupType): Register type as non-obsolete type.
(InitCoreTypes): Set expression type of object_type and value_type
immediately after lookup.
2007-01-01 Miguel de Icaza <miguel@novell.com>
* cs-tokenizer.cs: Accept Pc class characters (Connector
Punctuation) as valid identifiers. Fixes #78259
* expression.cs (Invocation.DoResolve): Moved the check for the
use of `this' for doing method calls to the Invocation resolution
step, after overload resolution has taken place instead of doing
the check at the low-level `This.DoResolve' level.
The `This.DoResolve' happens before overload resolution, so it has
no way of knowing if the method that will be called will be
instace or static, triggering an erroneous report for cs0188 (Bug
78113).
We now do the check for instance method invocations after we know
what method will be called.
(This.CheckThisUsage): Move the actual use of this structure
checking into its own method and expose it.
* Everywhere that called Error_ValueCannotBeConverted: pass a new
EmitContext.
Exceptions: Null.ConvertImplicitly,
Constant.ImplicitConversionRequired as there are too many call
sites for passing the ec.
* ecore.cs (Expression.Error_ValueCannotBeConverted): Take an
EmitContext, if the value is null, then we do not try to provide
the extra information from the error (If a userdefined conversion
exists, as UserDefinedConversion requires a non null-EmitContext).
Fixes: #80347
2006-12-30 Raja R Harinath <rharinath@novell.com>
* flowanalysis.cs (MyBitVector): Document some invariants.
(MyBitVector.Or, MyBitVector.And): Reimplement the optimizations
introduced below, and add a couple of others,
2006-12-30 Marek Safar <marek.safar@gmail.com>
* attribute.cs (GetMethodObsoleteAttribute): Uses new
GetPropertyFromAccessor and GetEventFromAccessor.
* class.cs (MethodCore.CheckBase): A new warning when obsolete member
overrides non-obsolete one.
(Indexer.Define): Error message has been moved to the parser.
* cs-parser.jay: Better syntax errors handling.
* delegate.cs (NewDelegate.DoResolve): Issue less confusing error message
when an invocation has no arguments.
* ecore.cs: Removed not used caching.
* expression.cs (IsSpecialMethodInvocation): Reuses TypeManager
implementation.
* report.cs: Add a new warning.
* support.cs (ReflectionParameters): Implements Equals, GetHashCode.
* typemanager.cs (enumeration_type): Removed.
(CSharpSignature): Reuses IsSpecialMethod.
(IsEqual): Hack for MS BCL.
(GetPropertyFromAccessor): New method.
(GetEventFromAccessor): New method.
(IsSpecialMethod): Fixed to handle more cases.
2006-12-30 Marek Safar <marek.safar@gmail.com>
* cs-tokenizer.cs (PreProcessDefinition, handle_preprocessing_directive):
Made white spaces array static.
* ecore.cs (RemoveGenericArity): Optimized.
* flowanalysis.cs (MyBitVector.Or, MyBitVector.And): Optimized (up to
10 times faster).
(MyBitVector.initialize_vector): Simplified.
2006-12-22 Miguel de Icaza <miguel@novell.com>
* ecore.cs: Am not entirely happy with this hack, but it seems to
address the issue in 80257 (a small test case for
CreativeDocs.NET).
I set the MethodGroupExpr.Type to an internal compiler type
(itself in this case) to force the resolution to take place. Why
it does not take place with a null is beyond me.
2006-12-20 Marek Safar <marek.safar@gmail.com>
A fix for bug #80288
* expression.cs (ResolveOperator): Consider user defined conversion for
logical and operator too.
(EmitBranchable): Optimization for logical and when full constant folding
could not be applied but one operand is constant.
2006-12-19 Marek Safar <marek.safar@gmail.com>
* class.cs (GetClassBases): Write 5 times every day, will never use
FullName for error reporting.
* decl.cs (AsAccessible, CheckAccessLevel): Always unpack arrays first.
2006-12-19 Martin Baulig <martin@ximian.com>
* statement.cs (LocalInfo.EmitSymbolInfo): New public method; emit
the symbol file info here.
2006-12-18 Marek Safar <marek.safar@gmail.com>
* cs-tokenizer.cs (handle_preprocessing_directive): When previous section
of `elseif' is taking then following sections are not taking.
Fixes an issue reported on mono mailing list.
2006-12-18 Marek Safar <marek.safar@gmail.com>
A fix for bug #80300
* cs-tokenizer.cs (PreProcessDefinition): Do no define/undefine when
a caller is not taking.
2006-12-18 Raja R Harinath <rharinath@novell.com>
* anonymous.cs: Change several TypeContainer declarations to DeclSpace.
(CompilerGeneratedClass): Use parent.PartialContainer unconditionally.
(RootScopeInfo, AnonymousMethodMethod): Update to changes.
* iterator.cs: Change several TypeContainer declarations to DeclSpace.
* class.cs: Update to changes.
2006-12-17 Marek Safar <marek.safar@gmail.com>
A fix for bug #79934
* anonymous.cs (CompilerGeneratedClass): Register class in a shared
partial container.
* class.cs (ResolveMembers): Register an iterator in current container and
not in shared one.
2006-12-16 Raja R Harinath <rharinath@novell.com>
Fix test-543.cs
* expression.cs (VerifyArgumentsCompat): Allow zero arguments to
satisfy a params annotated parameter.
2006-12-16 Marek Safar <marek.safar@gmail.com>
A fix for bug #77014
* expression.cs (Invocation.BetterFunction): Fixed to cope with dynamic
paramters correctly and not rely on hacks in Parameters class.
(Invocation.IsParamsMethodApplicable): Changed to accept params parameter
at any possition.
(Invocation.VerifyArgumentsCompat): Ditto.
(Invocation.EmitArguments): Changed to correctly emit params arguments at
any possition.
* parameter.cs (HasParams): Don't assume that params is the last one.
* support.cs (ReflectionParameters.ctor): Look for params attribute
correctly.
(ReflectionParameters.ParameterType): Removed hack when we returned last
parameter for out of range parameters.
(ParameterName, ParameterModifier): Ditto.
2006-12-14 Marek Safar <marek.safar@gmail.com>
A fix for bug #79987
* decl.cs (DeclSpace.VerifyClsCompliance): External names cache is null
when assembly is not CLS compliant but type is. I have no idea why is this
allowed.
* typemanager.cs (Reset): Invalidate AllClsTopLevelTypes cache.
2006-12-13 Miguel de Icaza <miguel@novell.com>
* class.cs (ConstructorInitializer.Resolve): Allow for ":this()"
in struct constructors, they are basically no-ops.
2006-12-12 Marek Safar <marek.safar@gmail.com>
* cs-tokenizer.cs (Position): Save preprocessor status too.
2006-12-12 Marek Safar <marek.safar@gmail.com>
A fix for bug #77794
* cs-tokenizer.cs (consume_identifier): Check for correct partial context.
2006-12-12 Marek Safar <marek.safar@gmail.com>
* cs-tokenizer.cs (get_cmd_arg): Support CR as the line terminator.
Fixes #69299.
(pp_expr): Report error for an invalid expression.
(handle_preprocessing_directive): Simplified; add more error checking.
2006-12-11 Marek Safar <marek.safar@gmail.com>
A fix for bug #74939
* cs-tokenizer.cs (is_punct): We cannot simply disable preprocessor
directives handling.
2006-12-10 Marek Safar <marek.safar@gmail.com>
A fix for bugs #80093, and #75984
* cs-tokenizer.cs (handle_preprocessing_directive): Fixed #if/#else/#endif
logic, it seems to me as it worked before "by coincidence".
(xtoken): Simplified to use reworked handle_preprocessing_directive.
(cleanup): Enabled endif check.
2006-12-09 Marek Safar <marek.safar@gmail.com>
A fix for bug #80162
* statement.cs (CollectionForeach.TryType): Generics and non-generics
enumerators are never ambiguous.
2006-12-08 Raja R Harinath <rharinath@novell.com>
Fix #80060
* cs-tokenizer.cs (parse_less_than): Recognize double-colons too.
2006-12-06 Marek Safar <marek.safar@gmail.com>
A fix for bug #80144
* class.cs (EventProperty.Define): Explicit implementation means
that an even is used.
2006-12-06 Marek Safar <marek.safar@gmail.com>
Fixes the operators implementation (part II)
* cfold.cs (DoConstantNumericPromotions): Renamed to
DoBinaryNumericPromotions and simplified.
(BinaryFold): Couple of conversion fixes; simplified.
* constant.cs, ecore.cs, literal.cs
(ToType): Renamed to ConvertImplicitly.
(Reduce): Renamed to ConvertExplicitly.
* class.cs, convert.cs: Updated.
* expression.cs: TryReduce doesn't throw an exception.
2006-12-01 Marek Safar <marek.safar@gmail.com>
A fix for bug #80108
* ecore.cs (EventExpr.EmitAddOrRemove): Don't crash when right side is not
compatible.
2006-11-30 Marek Safar <marek.safar@gmail.com>
Fixes unary operators implementation (part I)
Also fixes #80026
* cfold.cs (Error_CompileTimeOverflow): Made internal
* const.cs (IConstant): Changed to use reference to constant and
not constant itself.
Updated IConstant implementations.
* constant.cs (CreateConstant): New factory method.
Updated IConstant implementation.
* convert.cs (ImplicitStandardConversionExists): Uses compiler Equals.
* ecore.cs: Updated to use CreateConstantReference.
* enum.cs: Reflects IConstant changes.
* expression.cs (Unary): Reimplemented +,-,~ to conform C# standard.
* literal.cs (NullConstant): Change to be independently usable.
2006-11-29 Martin Baulig <martin@ximian.com>
* class.cs (Constructor.Emit): Correctly handle anonymous methods;
we need to emit the scope initializer before calling the base .ctor.
* anonymous.cs: Merged back from the new anonymous methods branch.
(AnonymousMethodHost): Renamed to `RootScopeInfo'.
* expression.cs (ParameterReference.DoResolveBase): Create a
"normal" ScopeInfo when capturing parameters rather than using the
root scope; this makes things work with anonymous methods having
parameters.
* statement.cs
(ToplevelBlock.AnonymousMethodHost): Renamed into `RootScope'.
2006-11-22 Marek Safar <marek.safar@gmail.com>
A fix for bug #79987
* class.cs (VerifyClsCompliance): Move redundant CLS compliance attribute
check to a base class.
* decl.cs (VerifyClsCompliance): Warn that CLS compliance cannot be tested
only when assembly has missing attribute.
* report.cs: Update.
2006-11-21 Marek Safar <marek.safar@gmail.com>
* cs-tokenizer.cs: Merged with gmcs version.
2006-11-20 Marek Safar <marek.safar@gmail.com>
* cs-tokenizer.cs,
* cs-parser.jay: Better error message when partial keyword is misplaced.
2006-11-19 Gert Driesen <drieseng@users.sourceforge.net>
A fix for bug #79810
report.cs: CS1058 only applies to 2.0 profile (gmcs).
codegen.cs: on 2.0 profile, non-exception throwables are wrapped in
a RuntimeWrappedException by default.
2006-11-18 Marek Safar <marek.safar@gmail.com>
A fix for bug #79843
* delegate.cs (Delegate.VerifyMethod): Fixed covariance and contravariance
implementation.
(DelegateCreation.Error_NoMatchingMethodForDelegate): Ditto.
2006-11-18 Marek Safar <marek.safar@gmail.com>
* driver.cs, namespace.cs: Uses faster IndexOf version.
2006-11-17 Marek Safar <marek.safar@gmail.com>
A fix for bug #79941
* class.cs (MemberCore.IsDuplicateImplementation): Add more tricks for
operators.
(Operator.Define): Implicit/Explicit operator of same type is duplicate
even if internal name is different.
* convert.cs (GetConversionOperator): Replaced EmitContext with parentType.
(UserDefinedConversion): Simplified as the operators cannot be internal.
* ecore.cs (Error_ValueCannotBeConverted): Take account of user
conversions.
(MethodLookup): Replaced EmitContext with parentType.
* expression.cs: Updated.
2006-11-09 Raja R Harinath <rharinath@novell.com>
* driver.cs (BadAssembly): Handle all the ugliness of
DefineDynamicAssembly.
2006-11-08 Raja R Harinath <rharinath@novell.com>
Address parts of #58244 -- most of what's left is in the runtime
* driver.cs (LoadAssembly): Simplify slightly. Add CS0009 and
CS1509 error checks, and handle them for all assembly loads, not
just the first invocation.
(LoadModule): Likewise. Move handling of 'adder_method' ...
* codegen.cs (AssemblyClass.AddModule): ... here.
2006-11-02 Marek Safar <marek.safar@gmail.com>
* statement.cs.cs (CollectionForeach.TryType): Issue a error when
IEnumerable<T> is ambiguous.
2006-10-31 Marek Safar <marek.safar@gmail.com>
A fix for bug #67689
* statement.cs.cs (CollectionForeach.TryType): Issue a warning when
GetEnumerator is ambiguous.
* report.cs: Add new warning.
2006-10-29 Marek Safar <marek.safar@gmail.com>
A fix for bug #78602
ecore.cs (PropertyExpr.InstanceResolve): The qualifier for access
to protected member can be nested type.
2006-10-28 Marek Safar <marek.safar@gmail.com>
A fix for bug #78965
ecore.cs (PropertyExpr.InstanceResolve): The qualifier for access
to protected member must derive from current type.
2006-10-27 Marek Safar <marek.safar@gmail.com>
assign.cs: Reuses error method.
ecore.cs (Expression.Error_ValueCannotBeConverted): Report a value
instead of type for constants.
(Expression.Error_ValueAssignment): Common error method.
* expression.cs (UnaryMutator.ResolveOperator): Value cannot be used
for any assignment.
2006-10-27 Marek Safar <marek.safar@gmail.com>
A fix for bug #79081
* expression.cs (MemberAccess.DoResolve): Check nested type
accessibility.
2006-10-27 Atsushi Enomoto <atsushi@ximian.com>
* doc.cs : nested delegates were not handled. Fixed bug #79754.
2006-10-26 Marek Safar <marek.safar@gmail.com>
A fix for bug #76591
* cs-tokenizer.cs (IsCastToken): Enable a cast of anonymous method.
2006-10-26 Marek Safar <marek.safar@gmail.com>
* codegen.cs (AssemblyClass.ApplyAttributeBuilder): Don't allow to have
type forwarder of the same type multiple times.
2006-10-26 Raja R Harinath <rharinath@novell.com>
Fix #78820
* ecore.cs (PropertyExpr.InstanceResolve): Always resolve the
instance as an rvalue, even when we later resolve as an lvalue.
2006-10-25 Martin Baulig <martin@ximian.com>
* anonymous.cs: Fix #79673.
2006-10-24 Marek Safar <marek.safar@seznam.cz>
A fix for bug #79666
expression.cs (ArrayCreation.GetAttributableValue): An initializer can be
ignored when is optimized (= default value) as its value is already set.
2006-10-23 Marek Safar <marek.safar@seznam.cz>
A fix for bug #79724
* report.cs (SymbolRelatedToPreviousError): Uses DeclSpace instead of
TypeContainer for type lookup.
2006-10-23 Marek Safar <marek.safar@seznam.cz>
A fix for bug #79231
* ecore.cs (ResolveAsBaseTerminal): Removed redundant error test.
* expression.cs (OverloadResolve): Always convert type name for
an error message.
(ResolveNamespaceOrType): Don't confuse a nested type with any
other member.
2006-10-18 Martin Baulig <martin@ximian.com>
* anonymous.cs: Propagate the IsStatic state, fixes the crasher in banshee.
2006-10-17 Miguel de Icaza <miguel@novell.com>
* convert.cs: Fix typo, fixes the test-535.cs, we were casting to
an int32, but requesting an int64 from the conversion
2006-10-12 Martin Baulig <martin@ximian.com>
* anonymous.cs
(AnonymousContainer.Resolve): Inflate the `ReturnType'. Fixes #79592.
2006-10-12 Martin Baulig <martin@ximian.com>
* statement.cs
(Using.EmitLocalVariableDeclFinally): Small fix for iterators.
2006-10-11 Miguel de Icaza <miguel@novell.com>
* convert.cs: Remove broken code: I was doing the "Existance"
tests for Implicit conversions.
2006-10-10 Miguel de Icaza <miguel@novell.com>
* convert.cs: Added one missing case in
ImplicitStandardConversionExists uint64 to intptr.
Fixes #59800
* typemanager.cs (uintptr_type): another core known type.
* ecore.cs (OperatorCast): routine used to do cast operations that
depend on op_Explicit. We could change some of the Decimal
conversions to use this.
This one has a probe mechanism that checks both types for an op_
which it coudl be used to eliminate two classes: CastToDecimal
and CastFromDecimal.
* convert.cs: Implement the conversions documented in #59800
2006-10-10 Martin Baulig <martin@ximian.com>
* iterators.cs (Iterator.Resolve): Call RootScope.ResolveType()
before RootScope.ResolveMembers().
* anonymous.cs (ScopeInfo.CapturedScope.ctor): Use the child's
`CurrentType' if appropriate.
2006-10-09 Marek Safar <marek.safar@seznam.cz>
A fix for bug #78568
* cs-tokenizer.cs (Deambiguate_CloseParens): Expression cannot be cast
when contains binary operators.
* cs-parser.jay: Updated.
2006-10-09 Martin Baulig <martin@ximian.com>
* delegate.cs
(Delegate.DefineType): Don't call TypeParameter.Resolve() here;
moved that into Define() and also do the other type parameter
checks there. Fixes #79094. Added gtest-292.cs.
* expression.cs
(ArrayCreation.EmitDynamicInitializers): Use `etype.IsValueType'
since that doesn't include type parameters; don't use `Ldelema'
for type parameters. Fixes #78980. Added gtest-293.cs.
2006-10-08 Marek Safar <marek.safar@seznam.cz>
A fix for #77796
* convert.cs (ExplicitReferenceConversion): Only enum to enum value
conversion is allowed.
2006-10-06 Marek Safar <marek.safar@seznam.cz>
* ecore.cs (Expression.MemberLookup): Don't register any symbol for
error reporting when no error occurs.
2006-10-06 Marek Safar <marek.safar@seznam.cz>
* cfold.cs (ConstantFold.BinaryFold): Report an error when the conversion
does not exist.
2006-10-06 Raja R Harinath <rharinath@novell.com>
Fix #79584
* class.cs (DefineTypeBuilder): Check circular dependencies before
setting the parent of the TypeBuilder.
(CheckRecursiveDefinition): Don't use 'BaseType', since
it may not be valid until after DefineTypeBuilder. Use
'base_type' instead.
2006-10-04 Martin Baulig <martin@ximian.com>
Merged the Anonymous Methods patch.
* anonymous.cs, iterators.cs: The new anonymous methods code.
* statement.cs (Variable): New public abstract class.
(LocalInfo.Variable): New public property.
(LocalInfo.ResolveVariable): New public method.
(Block.Flags): Add `IsIterator'.
(Block.AddVariable): Improved the CS0136 check.
(Block.AnonymousChildren): New public property.
(Block.AddAnonymousChild): New public method.
(ToplevelBlock): Update to use the new anonymous method framework.
(ToplevelBlock.ctor): `container' is now a `Block' and not a
`ToplevelBlock'; this is required to correctly implement the
CS0136 check.
(Fixed, Using): Use `TemporaryVariable' instead of directly
creating the `LocalBuilder'.
* parameter.cs (Parameter.ResolveVariable): New public method.
(Parameters.ResolveVariable): Likewise.
* ecore.cs (TemporaryVariable): Use the new `Variable' framework.
* class.cs (TypeContainer): Replaced the `iterators' list and
corresponding methods with a list of `CompilerGeneratedClass'es.
(TypeContainer.ResolveMembers): New public method.
(Method): `IIteratorContainer' has been replaced by
`IAnonymousHost'.
* expression.cs (VariableReference): New public abstract base
class for `LocalVariableReference', `ParameterReference' and
`This'.
* codegen.cs (EmitContext): Removed `capture_context',
`HaveCaptureInfo', `EmitScopeInitFromBlock()' and `Capture*()'.
(EmitContext.EmitThis): Removed.
* cs-parser.jay: Replace `iterator_container' with
`anonymous_host'.
2006-10-04 Martin Baulig <martin@ximian.com>
* generic.cs (GenericMethod): Don't make this abstract.
(Constraints.Clone): Added dummy implementation.
2006-10-04 Raja R Harinath <harinath@gmail.com>
Fix #79577
* namespace.cs (LookForAnyGenericType): Avoid nullref on
'declspaces'. Avoid allocating arrays willy-nilly.
Fix #79553
* cfold.cs (BinaryFold): Move boolean Equality and Inequality
cases out of the switch.
2006-09-28 Marek Safar <marek.safar@seznam.cz>
* namespace.cs (Namespace.Error_NamespaceDoesNotExist): Better error
message when non-generic type is used with the type arguments.
* expression.cs: Updated.
2006-09-28 Raja R Harinath <rharinath@novell.com>
Fix #79013
* convert.cs (Convert.ImplicitStandardConversionExists): Avoid infloop.
* expression.cs (EmptyExpression.Grab, EmptyExpression.Release):
Change semantics slightly. Don't insist on having only one
temporary EmptyExpression -- just throttle the creation of new ones.
Fix #79451
* ecore.cs (Expression.MemberLookup): Enable CS0229 errors for
non-interfaces too. If no methods are found, don't try to create
a MethodGroupExpr.
2006-09-28 Marek Safar <marek.safar@seznam.cz>
* ecore.cs (ResolveAsTypeStep): Print better error when type can be
generic type.
* namespace.cs (Namespace.LookForAnyGenericType): New method to help
us produce better error message.
2006-09-27 Marek Safar <marek.safar@seznam.cz>
* expression.cs (Binary.ResolveOperator): Warn about a side effect
of the `|' operator.
* report.cs: A new warning added.
2006-09-27 Martin Baulig <martin@ximian.com>
* generic.cs (GenericMethod): Don't make this abstract.
2006-09-27 Martin Baulig <martin@ximian.com>
* report.cs
(InternalErrorException): Added overloaded ctor taking a params array.
2006-09-26 Marek Safar <marek.safar@seznam.cz>
* class.cs, codegen.cs, const.cs, cs-tokenizer.cs, driver.cs, ecore.cs:
Fixed the cases when same error was reported twice.
* report.cs (SymbolRelatedToPreviousError): Simplified as all our messages
now report symbol information.
2006-09-25 Martin Baulig <martin@ximian.com>
* class.cs: Completely unified with the gmcs version.
2006-09-25 Martin Baulig <martin@ximian.com>
* typemanager.cs (TypeManager.IsNullableType): New public function.
(TypeManager.IsNullableTypeOf): Likewise.
(TypeManager.IsNullableValueType): Likewise.
* class.cs (MethodCore): Added the `GenericMethod' argument from
gmcs and also unified all classes derived from `MethodCore' with gmcs.
2006-09-24 Raja R Harinath <harinath@gmail.com>
* convert.cs: Unify with gmcs version.
2006-09-24 Marek Safar <marek.safar@seznam.cz>
* decl.cs (DeclSpace.VerifyClsCompliance): When type has type parameters
verify them as well.
* report.cs: New warning.
2006-09-24 Marek Safar <marek.safar@seznam.cz>
* anonymous.cs (AnonymousMethod.Compatible): Cannot generate arguments
for anonymous block with out argument.
2006-09-24 Marek Safar <marek.safar@seznam.cz>
* class.cs (ClassOrStruct.VerifyMembers): Fixed to report correctly
not used private events only.
2006-09-23 Marek Safar <marek.safar@seznam.cz>
* cfold.cs (BinaryFold): On the guest to unify empty constant cast.
* const.cs (Const.Define): Check for constant type.
(Const.IsConstantTypeValid): Looks for valid constant types.
* convert.cs (ImplicitReferenceConversion): NullCast to EmptyConstantCast.
* ecore.cs (EmptyConstantCast): New common class for all constant based
EmptyCast(s).
* expression.cs (Is.DoResolve): Handle null constant especially.
(New.DoResolve): Check for new void().
(MemberAccess.DoResolve): Cope with all kind of nulls.
* literal.cs (NullConstant): Uses EmptyConstantCast.
(NullDefault): Based on EmptyConstantCast.
(NullLiteral): Uses EmptyConstantCast.
* statement.cs (Block.ResolveMeta): Check for constant type.
2006-09-22 Martin Baulig <martin@ximian.com>
* delegate.cs, attribute.cs: Merged with the gmcs versions.
2006-09-22 Raja R Harinath <rharinath@novell.com>
* literal.cs (NullDefault): The type of default(IFoo) is 'IFoo',
not the null type.
Fix part of #79451
* typemanager.cs (Closure.Filter): Consider PrivateScope attributes.
* decl.cs (DeclSpace.FindMemberToOverride): Likewise. Reorganize
code slightly.
2006-09-22 Martin Baulig <martin@ximian.com>
* ecore.cs: Merged with the gmcs version.
* generic.cs (ConstructedType): New dummy class.
(TypeArguments): Don't make this abstract.
* typemanager.cs
(TypeManager.IsGenericTypeDefinition): New method.
(TypeManager.GetGenericFieldDefinition): Moved here from gmcs.
2006-09-22 Raja R Harinath <rharinath@novell.com>
* expression.cs (ComposedCast): Check for arrays of TypedReference
before creating the type, not after.
2006-09-21 Marek Safar <marek.safar@seznam.cz>
* cfold.cs, const.cs, enum.cs, statement.cs: Updated
after ToType change.
* constant.cs (Constant.ImplicitConversionRequired): Designed to used
when constant must be implicitly convertible.
* convert.cs (ImplicitReferenceConversion): Reuse ToType.
* ecore.cs (NullCast): Derives from NullConstant.
* expression.cs (Is.DoResolve): Removed useless variables.
(Conditional.DoResolve): Quick hack for `Foo () ? null : null'.
(New.Constantify): Add enum support.
(MemberAccess.DoResolve): Add warning when accessing null constant or
variable.
* generic.cs (GenericConstraints.IsReferenceType): Another dummy
property.
* literal.cs (NullConstant): New abstract class with common
functionality for all null specializations.
(NullDefault): Represents default(X) when result can be
reduced to null.
(NullLiteral): Updated.
* report.cs: Add new warning.
2006-09-21 Martin Baulig <martin@ximian.com>
* generic.cs (GenericTypeParameterBuilder): Removed this ugly hack.
2006-09-21 Martin Baulig <martin@ximian.com>
* generic.cs (GenericConstraints): New dummy class.
(Constraints): Likewise.
(TypeParameter): Likewise.
(TypeParameterName): Likewise.
(GenericMethod): Likewise.
* typemanager.cs (TypeManager.GetGenericArguments): New method.
* decl.cs: Merged with the gmcs version.
2006-09-21 Raja R Harinath <rharinath@novell.com>
* generic.cs (TypeParameter): Implement IMemberContainer.
(GenericTypeParameterBuilder): New. An abominable repugnant hack.
* rootcontext.cs: Unify with gmcs version.
* report.cs: Unify with gmcs version.
* typemanager.cs (AddTypeParameter, LookupTypeParameter): Move
from gmcs/generics.cs.
* generics.cs (TypeParameter): New dummy class.
* support.cs: Unify with gmcs version.
2006-09-20 Raja R Harinath <rharinath@novell.com>
* ecore.cs (MethodGroupExpr.ResolveGeneric): New dummy method.
* expression.cs (MemberAccess, BaseAccess): Remove GMCS_SOURCE #ifdef.
* decl.cs (MemberName): Unify with gmcs, except for GetTypeExpression.
* generic.cs (TypeArguments): New dummy class to help avoid #ifdefs.
* mcs.exe.sources: Add generic.cs.
* codegen.cs: Unify with gmcs version.
* codegen.cs (IResolveContent.GenericDeclContainer): Copy from gmcs.
(EmitContext): Add GenericDeclContainer implementation.
* decl.cs (MemberCore, DeclSpace): Likewise.
* namespace.cs: Remove #ifdef GMCS_SOURCE.
* namespace.cs (GetTypeInAssembly): Remove #ifdef GMCS_SOURCE.
MCS TypeManager has a corresponding dummy method.
2006-09-19 Martin Baulig <martin@ximian.com>