-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathChangeLog
More file actions
1926 lines (1378 loc) · 70.4 KB
/
Copy pathChangeLog
File metadata and controls
1926 lines (1378 loc) · 70.4 KB
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
2009-05-27 Rodrigo Kumpera <rkumpera@novell.com>
* TypeDef.cs: Add field method_list to preserve definition
order of methods when emiting the PE file.
2009-04-20 Ankit Jain <jankit@novell.com>
Fix bug #494221
* MethodDef.cs (BeginLocalsScope): New.
(EndLocalsScope): New.
(AddLocals):
(GetNamedLocal): Support scoping for .locals
2009-04-15 Ankit Jain <jankit@novell.com>
* MethodDef.cs (GetNamedLocalSlot): Return -1 if local var not found.
2009-03-31 Rodrigo Kumpera <rkumpera@novell.com>
* MethodDef.cs (WriteCode): Emit labels which use offsets as absolute PEAPI
CilLabels.
2008-07-02 Ankit Jain <jankit@novell.com>
Fix bug #405383
* MethodPointerTypeRef (Clone): Add missing null ref check.
Patch from Andrea Carlo Ornstein <andrea.ornstein@st.com>
2008-06-07 Martin Baulig <martin@ximian.com>
* DebuggingInfo.cs: Reflect latest symbol writer changes.
2008-06-02 Ankit Jain <jankit@novell.com>
Fix bug #367114.
* CatchBlock.cs: Allow exception to be of any type (BaseTypeRef) and not
just a class (BaseClassRef).
2008-06-01 Ankit Jain <jankit@novell.com>
Fix bug #364580.
* MethodDef.cs (CreateSignature): Add new @include_optional and
@call_conv param. Make private.
(CreateVarargSignature): Likewise.
(CreateSignature): Add new static method for vararg and other methods.
(GetVarargSig): Add new @full_signature param to uniquely identify
vararg methods.
* CodeGen.cs (ResolveVarargMethod): This now takes two signatures - one
with only the required params and the other with the optional ones, to
correctly resolve global vararg methods.
* BaseTypeRef.cs:
* GenericTypeInst.cs:
* GlobalMethodRef.cs:
* PrimitiveTypeRef.cs:
* TypeDef.cs: Track api changes.
2008-04-10 Erven Rohou <erven.rohou@st.com>
* DebuggingInfo.cs: use new DefineMethod API. Remove useless
variable.
* MethodDef.cs: remove useless variable.
2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
* MethodDef.cs: Mono.CompilerServices API has changed in an incompatible way
since Erven's patch. Fixed it to follow the new one.
2008-04-07 Erven Rohou <erven.rohou@st.com>
* DebugInfo.cs, MethodDef.cs: Add support for emitting variable names
in mdb file.
2008-02-07 Gert Driesen <drieseng@users.sourceforge.net>
* CodeGen.cs: Use original filename as base name for debug file.
Symbol writer will already add .mdb to it. Fixes bug #359516.
2008-01-03 Rodrigo Kumpera <rkumpera@novell.com>
* EmiteByteInstr.cs: Fixed typo in class name.
2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
* EmiteByteInstr.cs: added. Implements support
for the .emitbyte directive.
2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
* SwitchInstr.cs (Emit): Switch from using strings
to LabelInfo.
2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
* MethodPointerTypeRef.cs (.ctor): generate
full name of the method pointer. This is required
to alow overloading with method pointers.
2007-07-18 Jb Evain <jbevain@novell.com>
* InstrTable.cs: add brzero alias.
2007-01-10 Ankit Jain <jankit@novell.com>
* BaseClassRef.cs (Clone): Move to ..
* BaseTypeRef.cs (Clone): .. here.
* Sentinel.cs: Implement abstract Clone method.
* MethodPointerTypeRef.cs: Likewise.
* PrimitiveTypeRef.cs: Likewise.
* ModifiableType (MakeCustomModified): Add to SigMod.
* GenericTypeInst.cs:
* GenericParamRef.cs:
* TypeRef.cs:
* ExternTypeRef.cs: Update.
Tue Dec 12 19:23:34 CET 2006 Paolo Molaro <lupus@ximian.com>
* PropertyDef.cs: support more than one .other method in properties.
Tue Dec 12 19:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
* EventDef.cs: support more than one .other method in events.
2006-11-09 Ankit Jain <jankit@novell.com>
* CodeGen.cs (CodeGen.BeginAssemblyRef): Add param for attributes.
(SetAssemblyName): Rename to ..
(SetThisAssembly): .. this. Add param for attributes.
* ExternTable (ExternAssembly.ctor): Likewise.
(ExternAssembly.Resolve): Add attributes.
(ExternTable.AddAssembly): Add param for attributes.
(ExternTable): Update to changes.
* Assembly.cs (Assembly.SetAssemblyAttr): New.
(Assembly.Resolve): Add the flags.
2006-07-20 Ankit Jain <jankit@novell.com>
* TypeDef.cs (.ctor): If the type is an interface, then make it
abstract.
(TypeDef.AddMethodDef): Set an interface method abstract and virtual if
it lacks either of the attributes.
* MethodDef.cs (MethodDef.FullName): New.
(MethodDef.WriteCode): Make global methods, non-abstract and static.
Interface cannot have a non-static method with a body.
Update error messages to use new FullName property.
2006-06-07 Ankit Jain <jankit@novell.com>
* TypeDef.cs (TypeDef.IsAbstract): New.
* MethodDef.cs (MethodDef.WriteCode): Parent type must also be abstract
for an abstract method. Abstract methods cannot have a body.
Report errors for body with different implementation attributes like
native/runtime/unmanaged etc.
If the method has no body, then emit a 'ret'.
2006-06-07 Ankit Jain <jankit@novell.com>
* TypeDef.cs (TypeDef.AddFieldDef):
(TypeDef.Define): Use Report.Warning instead of Console.Error.WriteLine
(TypeDef.AddMethodDef): Likewise. Also, use methoddef.Location .
* ExternTable.cs (ExternTable.GetTypeRef): Likewise.
* MethodDef.cs (MethodDef.StartLocation): New.
2006-06-01 Ankit Jain <jankit@novell.com>
* MethodDef.cs (GetNamedParamPos): Return -1 if param_list is null.
2006-06-01 Ankit Jain <jankit@novell.com>
* MethodDef.cs (MethodDef): Use a ParamDef for return type, instead of a
BaseTypeRef.
(MethodDef.ctor): Update.
(MethodDef.AddParamDefaultValue): Remove.
(MethodDef.GetParam): Likewise.
(MethodDef.Resolve): Update to use ret_param instead of ret_type.
2006-05-31 Ankit Jain <jankit@novell.com>
* TypeDef.cs (TypeDef.IsValueType): New.
(TypeDef.IsEnumType): New.
(TypeDef.Define): Don't seal System.ValueType or System.Enum .
2006-05-26 Ankit Jain <jankit@novell.com>
* Assembly.cs: New. Represents a '.assembly {}' (assembly manifest).
* CodeGen.cs: Update to use the Assembly class.
2006-05-26 Ankit Jain <jankit@novell.com>
* PermissionSet.cs: New.
* Permission.cs: New.
* PermissionMember.cs: New. Classes for 2.0 metadata format of
declarative security.
* DeclSecurity.cs (DeclSecurity.AddPermissionSet): New. Overload for new
PermissionSet class.
(DeclSecurity.AddTo): Add new style PermissionSets also.
* CodeGen.cs (CodeGen.AddPermisson): Handle new PermissionSets also.
* ExternTable.cs (ExternAssembly.AssemblyName): New.
2006-05-23 Ankit Jain <jankit@novell.com>
* DeclSecurity.cs (IDeclSecurityTarget): Remove AddPermission &
AddPermissionSet methods. Add 'DeclSecurity' property.
* TypeDef.cs: Update implementation of IDeclSecurityTarget interface.
* MethodDef.cs: Likewise.
* ExternTable.cs: Likewise.
* CodeGen.cs (CodeGen.AddPermission): Use IDeclSecurityTarget.DeclSecurity .
2006-05-11 Ankit Jain <jankit@novell.com>
* CodeGen.cs (CodeGen.AddDataDef): Use Report.Error for consistent error
reporting.
* MethodDef.cs (MethodDef.AddLabel): Likewise.
2006-05-11 Ankit Jain <jankit@novell.com>
* MethodDef.cs (MethodDef.AddLabel): Fix exception message.
2006-05-09 Ankit Jain <jankit@novell.com>
* MethodDef.cs (MethodDef.AddLabel): Throw exception for duplicate
labels.
2006-05-09 Ankit Jain <jankit@novell.com>
* CodeGen.cs (CodeGen.data_list): Change to ..
(CodeGen.data_table): .. a hashtable.
(CodeGen.AddDataDef): Update to throw exception for duplicate .data
labels.
(CodeGen.GetDataConst): Update to use data_table.
2006-04-24 Ankit Jain <jankit@novell.com>
* CodeGen.cs (CodeGen.ctor): Remove 'is_assembly' param.
(CodeGen.Write): Emit assembly manifest only if the source
had it.
2006-02-22 Ankit Jain <jankit@novell.com>
* ExternTable.cs (ExternTable.GetTypeRef): Emit a warning if mscorlib is
referenced without a corresponding '.assembly extern' directive.
* TypeDef.cs (TypeDef.Define): Valuetype class should be sealed. Emit
warning if its not, and make it so.
2006-02-20 Ankit Jain <jankit@novell.com>
* *.cs: Update all .cs files to use Report.Error instead of directly
throwing an exception.
* CodeGen.cs (CodeGen.ctor): Remove 'report' param, and the related
field & property.
2006-02-19 Ankit Jain <jankit@novell.com>
* ExternTable.cs (ExternTable.GetModuleTypeRef): 'module_table' can be
null.
2006-02-19 Ankit Jain <jankit@novell.com>
* CodeGen.cs (CodeGen.Write): Use only filename as the name of the
module.
* TypeDef.cs (TypeDef.ResolveAsMethodRef): New.
(TypeDef.ResolveMethod): Change signature to take ret_type, params
etc instead of a signature string. Also, if the method does not exist,
then use ResolveAsMethodRef to return a MethodRef for it.
(TypeDef.ResolveVarargMethod): Likewise.
(TypeDef.ResolveField): Likewise.
* MethodRef.cs (MethodRef.Resolve): Update use of TypeDef.Resolve*
methods.
* FieldRef.cs (FieldRef.Resolve): Update use of TypeDef.ResolveField.
* PropertyDef.cs (PropertyDef.AsMethodDef): Throws an exception is the
method is not a MethodDef.
(PropertyDef.Define): Use AsMethodDef to ensure that get/set/other are
MethodDefs.
* EventDef.cs (EventDef.AsMethodDef): Same as PropertyDef.
(EventDef.Define): Likewise.
2006-02-19 Ankit Jain <jankit@novell.com>
* CodeGen.cs (CodeGen.ThisModule): New.
(CodeGen.Write): Set module name if not set by '.module' directive.
* Module.cs: Inherit from ExternRef.
2006-02-10 Ankit Jain <jankit@novell.com>
* CodeGen.cs (CodeGen.ResolveMethod): Throw exception if global method
not found.
(CodeGen.ResolveField): Likewise for global field.
2006-02-08 Ankit Jain <jankit@novell.com>
* PeapiTypeRef.cs (PeapiTypeRef.MakeBoundArray): Simplify and fix
behavior.
2006-01-31 Ankit Jain <jankit@novell.com>
* TypeDef.cs (TypeDef.AddMethodDef): Throw exception with proper message
if adding a duplicate method.
2006-01-31 Ankit Jain <jankit@novell.com>
* InstrTable.cs (inst_table): Add 'readonly.' .
2006-01-31 Ankit Jain <jankit@novell.com>
* ExternTable.cs (ExternTable.GetTypeRef): If type is from an
undeclared assembly, then add reference to the assembly.
2006-01-28 Ankit Jain <jankit@novell.com>
* MethodDef.cs:
* TypeManager.cs:
* MethodPointerTypeRef.cs:
* ExternMethodRef.cs: Remove unused variables to fix warnings.
2006-01-28 Ankit Jain <jankit@novell.com>
* TypeDef.cs (GenericInfo):
* MethodDef.cs (GenericInfo): Remove (unused).
2006-01-23 Ankit Jain <jankit@novell.com>
* TypeDef.cs (TypeDef.AddFieldDef): Throw exception if duplicate field being
added.
2006-01-19 Ankit Jain <jankit@novell.com>
* Module.cs (Module): New. Class for representing this module.
* CodeGen.cs (CodeGen): Update to use the new Module class.
(CodeGen.Write): Resolve this_module.
2006-01-19 Ankit Jain <jankit@novell.com>
* GenericParameters.cs (GenericParameter): Implement ICustomAttrTarget.
(GenericParameter.Resolve): New overload, reduce code duplication.
(GenericParameters.GetGenericParam): New. Returns a GenericParameter.
(GenericParameters.GetGenericParamNum): Update to use new GetGenericParam.
* TypeDef.cs (TypeDef.GetGenericParam): New. Two overloads for id and index.
* MethodDef.cs (MethodDef.GetGenericParam): Likewise.
2006-01-19 Ankit Jain <jankit@novell.com>
* MethodRef.cs (MethodRef.Resolve): Resolve owner.
2006-01-16 Ankit Jain <jankit@novell.com>
* TypeDef.cs (TypeDef.IComparable): Implement IComparable interface.
* TypeManager.cs (TypeManager.DefineAll): Sort type_table before Define()'ing.
2006-01-16 Ankit Jain <jankit@novell.com>
* TypeRef.cs (TypeRef.CreateMethodRef): Return a TypeSpecMethodRef if
this is a modified (eg. []) type.
2006-01-16 Ankit Jain <jankit@novell.com>
* BaseTypeRef.cs (BaseTypeRef.Resolve): Make this abstract.
(BaseTypeRef.CreateMethodRef):
(BaseTypeRef.CreateFieldRef): Make protected and abstract.
* BaseClassRef.cs (BaseClassRef.Clone): Make this abstract.
Update all derived classes.
* PrimitiveTypeRef.cs (PrimitiveTypeRef.CreateMethodRef):
* GenericTypeInst.cs (GenericTypeInst.CreateMethodRef): Implement, but throw
exception as this method is not used.
2006-01-14 Ankit Jain <jankit@novell.com>
* GenericParamRef.cs (GenericParamRef.Resolve): Apply modifications to the
cached type.
2006-01-14 Ankit Jain <jankit@novell.com>
* GenericParamRef.cs (GenericParamRef.Resolve): Set PeapiType of the instance
to the cached one.
2006-01-13 Ankit Jain <jankit@novell.com>
* GenericParamRef.cs (GenericParamRef.Resolve): Ensure no duplicate
GenParams get added to the TypeSpec table.
* GenericMethodSig.cs (GenericMethodSig.GetInstance): Cache sigs in a
static hashtable.
* BaseMethodRef.cs (BaseMethodRef.GetGenericMethodRef): Cache GenericMethodRefs.
2006-01-13 Ankit Jain <jankit@novell.com>
Create BaseMethodRef from IMethodRef. Replace usage of IMethodRef
with BaseMethodRef in *all* files.
Remove implementations of IMethodRef's methods from derived classes.
* BaseMethodRef.cs: New.
2006-01-13 Ankit Jain <jankit@novell.com>
Move caching of method-refs and field-refs to BaseTypeRef, and use
CreateMethodRef & CreateFieldRef for creating the actual object.
Override these in derived classes to return the right objects.
* BaseTypeRef.cs (BaseTypeRef.CreateMethodRef): New.
(BaseTypeRef.CreateFieldRef): New.
(BaseTypeRef.GetMethodRef): Implement caching.
(BaseTypeRef.GetFieldRef): Likewise.
GenericTypeInst and PrimitiveTypeRef are not cached, so static hashtables
are used here for caching their MethodRefs n FieldRefs.
* GenericTypeInst.cs (GenericTypeInst.GetMethodRef): Override and use
static hashtable to do caching.
(GenericTypeInst.GetFieldRef): Likewise.
* PrimitiveTypeRef.cs (PrimitiveTypeRef.GetMethodRef): Likewise.
(PrimitiveTypeRef.GetFieldRef): Likewise.
* CodeGen.cs (CodeGen.GetGlobalMethodRef): New. Cache global method refs.
(CodeGen.GetGlobalFieldRef): New. Cache global field refs.
2006-01-13 Ankit Jain <jankit@novell.com>
Create BaseClassRef, BaseGenericTypeRef from IClassRef & IGenTypeRef.
Replace usage of interfaces ITypeRef, IClassRef & IGenTypeRef with their
corresponding Base* types.
* BaseTypeRef.cs: New. Combine ITypeRef and ModifiableType into this.
* BaseClassRef.cs: New.
* BaseGenericTypeRef.cs: New.
* TypeSpecMethodRef.cs (TypeSpecMethodRef.ctor): Slight change in order
of params.
2006-01-12 Ankit Jain <jankit@novell.com>
* MethodDef.cs (MethodDef.CreateSignature): Use "`n" only for generic
methods.
2006-01-11 Ankit Jain <jankit@novell.com>
* InstrTable.cs (inst_table): Uncomment stelem and ldelem .
2006-01-11 Ankit Jain <jankit@novell.com>
Support new syntax of specifying namespace, ie., as
part of the type name. (gen-nested2.il)
* TypeDef.cs (TypeDef.ctor): Add outer as a param.
Don't split name on '.' for inner classes.
* CodeGen.cs (CodeGen.BeginTypeDef): Update to use only 'name'
for inner classes and FullName for outermost class.
2006-01-10 Ankit Jain <jankit@novell.com>
* TypeDef.cs (TypeDef.GetGenericParamNum): Return -1 if type has no
generic parameters.
* MethodDef.cs (MethodDef.GetGenericParamNum): Likewise.
2006-01-10 Ankit Jain <jankit@novell.com>
* MethodDef.cs (MethodDef.WriteCode): Resolve generic params for abstract
methods also.
2006-01-10 Ankit Jain <jankit@novell.com>
* TypeDef.cs (TypeDef.TypeParameters): New.
(TypeDef.ResolveGenParams): New. Resolve any gen param refs in
constraints, base class ref or implemented interfaces.
* MethodDef.cs (MethodDef.ResolveGenParams): Update to use new Resolve
overloads and ResolveConstraints for GenericParameters.
* GenericTypeInst.cs (GenericTypeInst.Resolve): Resolve generic args.
* GenericParamRef.cs (GenericParamRef.Resolve): Implement.
* GenericParameters.cs (GenericParameter.ResolveConstraints): New.
(GenericParameters.ResolveConstraints): New.
* GenericArguments.cs (GenericArguments.Resolve): New.
* TypeRef.cs (TypeRef.GetGenericTypeInst): Don't cache.
* ExternTypeRef.cs (ExternTypeRef.GetGenericTypeInst): Likewise.
2006-01-09 Ankit Jain <jankit@novell.com>
* GenericArguments.cs (GenericArguments.is_resolved): New.
(GenericArguments.p_type_list): New. Resolve only once and return this.
2006-01-09 Ankit Jain <jankit@novell.com>
* TypeDef.cs (TypeDef.Define): Set is_defined to true as soon as the
Peapi type gets created.
2006-01-09 Ankit Jain <jankit@novell.com>
* GenericTypeRef.cs: Rename to ..
* GenericParamRef.cs: .. this.
(IGenericTypeRef): New.
(GenericParamRef): Implement IGenericTypeRef.
* GenericTypeInst.cs (GenericTypeInst): Implement IGenericTypeRef instead
of IClassRef.
(GenericTypeInst.ResolveOnly): Rename to ResolveNoTypeSpec to implement
IGenericTypeRef.ResolveNoTypeSpec .
* MethodDef.cs (MethodDef.ResolveGenParams): Update to use GenericParamRef.
* Local.cs (Local.GetPeapiLocal): Use IGenericTypeRef.
2006-01-08 Ankit Jain <jankit@novell.com>
* InstrTable.cs (inst_table): Add stelem.any, ldelem.any and
constrained. instructions.
2006-01-07 Ankit Jain <jankit@novell.com>
* GenericParameters.cs (GenericParameter): New.
(GenericParameters): Collection of Generic parameters.
* TypeDef.cs:
* CodeGen.cs:
* MethodDef.cs: Update to use the new GenericParameters class.
2006-01-06 Ankit Jain <jankit@novell.com>
GenericTypeInst.Resolve should do the expected thing ie., resolve and add
the Generic Inst to the typespec table. Use ResolveOnly to Resolve w/o
adding to the table.
* GenericTypeInst.cs (GenericTypeInst.Resolve): Rename to ..
(GenericTypeInst.ResolveOnly): .. this.
(GenericTypeInst.ResolveAsClass): Rename to Resolve.
* TypeDef.cs (TypeDef.Define): Revert the ResolveAsClass calls added here.
* Local.cs (Local.GetPeapiLocal): Use new GenericTypeInst.ResolveOnly if type is
GenericTypeInst.
2006-01-06 Ankit Jain <jankit@novell.com>
* IClassRef.cs (IClassRef.Clone): New.
(IClassRef.GetGenericTypeInst): Get the Generic Instance of the IClassRef.
(IClassRef.ResolveInstance): Resolves the generic instance and returns the
resolved PEAPI type.
* TypeRef.cs:
* ExternTypeRef.cs: Implement new methods of IClassRef.
Classes implementing IClassRef cache their generic instances (GenericTypeInst)
and their corresponding resolved PEAPI types.
* CodeGen.cs (CodeGen.GetTypeRef): Gets a TypeRef given a type name and caches them.
GenericTypeInst is now used for any Generic Type Instance, including any
extern types. ExternTypeRefInst is not used now.
* GenericTypeInst.cs (GenericTypeInst): Implement IClassRef instead of ITypeRef.
(GenericTypeInst.ResolveAsClass): Adds the instance to the TypeSpec table after Resolve()'ing it.
Clone () returns a cloned instance which shares its class_ref and generic arguments.
* TypeDef.cs (TypeDef.Define): Use ResolveAsClass for base class and interfaces
being implemented if they are GenericTypeInsts.
2005-12-24 Jb Evain <jbevain@gmail.com>
* FeatureAttr.cs: tag as Flags, add an Instance value.
* PropertyDef.cs (PropertyDef.Resolve): Tag the property as instance or class.
2005-12-22 Ankit Jain <jankit@novell.com>
* MethodDef.cs (MethodDef.ctor): Add type_def param. Use this for all uses of
the owner type_def. ResolveGenParams () before creating signature.
(MethodDef.ResolveGenParams):
(MethodDef.ResolveGenParam): Remove type_def param, instead use type_def field.
(MethodDef.Define): Remove overload with typedef param.
(MethodDef.CreateSignature): Put "`0" right after the name instead of at the end.
* TypeDef.cs (TypeDef.DefineContents): Update usage of MethodDef.Define .
2005-12-21 Ankit Jain <jankit@novell.com>
* GenericArguments.cs (GenericArguments): New.
* ExternTypeRefInst.cs (ExternTypeRefInst):
* GenericTypeInst.cs (GenericTypeInst):
* GenericMethodSig.cs (GenericMethodSig): Update to use new GenericArguments class.
2005-12-16 Ankit Jain <jankit@novell.com>
Use tuple of (field name, type_name) for fielddef hashtable in TypeDef.cs and
CodeGen.cs
* FieldDef.cs (FieldDef.Type): New.
* TypeDef.cs (TypeDef.ResolveField): Add 'type_name' param.
* CodeGen.cs (CodeGen.ResolveField): Add 'type_name' param.
* FieldRef.cs (FieldRef.Resolve): Update usage of .ResolveField .
* GlobalFieldRef (GlobalFieldRef.Resolve): Likewise.
* ExternTable.cs (IScope.FullName): New. Returns full name including and enclosing class
or assembly/module name.
(ExternRef.FullName):
(ExternModule.FullName):
(ExternAssembly.FullName): Implement new IScope.FullName .
* ExternTypeRef.cs (ExternTypeRef.Clone): Clone SigMod also.
(ExternTypeRef.FullName): Update to return full name including enclosing type or assembly
or module name.
(ExternTypeRef.Name): Update to return only full_name with modifiers (array/pointers etc).
(ExternTypeRef.GetReflectedType): Use Name instead of FullName as only type name is required here.
* GenericTypeRef.cs (GenericTypeRef.FullName): Return proper fullname of the form (!0 or !!0).
* GenericTypeInst.cs (GenericTypeInst.ctor): Change param 'full_name' to 'name'. 'full_name' is
constructed here using the type parameter list.
Update code to use name instead of full_name.
2005-12-15 Ankit Jain <jankit@novell.com>
* CodeGen.cs (CodeGen.SetAssemblyName): Multiple .assembly declarations with different
names are not allowed.
2005-12-14 Ankit Jain <jankit@novell.com>
* PeapiTypeRef.cs (PeapiTypeRef.MakeBoundArray): Handle the case when only
lower bound (no size info) is available.
2005-12-14 Ankit Jain <jankit@novell.com>
* TypeDef.cs (TypeDef.ctor): name_space can be null.
2005-12-13 Ankit Jain <jankit@novell.com>
* TypeDef.cs (TypeDef.ctor): Ensure that 'name' contains only the last part
of the full (namespace + name) dotted name.
2005-12-12 Ankit Jain <jankit@novell.com>
* TypeDef.cs (TypeDef.Define): Ensure nested visibility for a nested class.
(TypeDef.NestedFullName): New.
2005-12-09 Ankit Jain <jankit@novell.com>
* MethodDef.cs (MethodDef.GenParamCount): typar_list can be null.
2005-12-09 Ankit Jain <jankit@novell.com>
* ITypeRef.cs (ITypeRef.GetMethodRef): Add 'gen_param_count' param.
* Sentinel.cs (Sentinel.GetMethodRef): Update.
* GlobalMethodRef.cs (GlobalMethodRef.ctor): Add 'gen_param_count' param.
(GlobalMethodRef.Resolve): Update usage of MethodDef.CreateSignature .
* TypeDef.cs (TypeDef.GetGenericParamNum): New.
(TypeDef.DefineContents): Update usage of ITypeRef.GetMethodRef .
* ExternTypeRefInst.cs (ExternTypeRefInst.ctor): Add parameter for list of type
parameters (type_list).
(ExternTypeRefInst.Clone): Clone type_list also.
(ExternTypeRefInst.Resolve): Resolve the list of type parameters, and create
instance of PEAPI.GenericTypeInst instead of PEAPI.ClassRefInst .
(ExternTypeRefInst.GetMethodRef): Update.
* GenericTypeInst.cs (GenericTypeInst.GetMethodRef): Update signature. Update
usage of TypeSpecMethodRef.ctor .
* MethodRef.cs (MethodRef.ctor): Add 'gen_param_count' param.
(MethodRef.Resolve): Throw exception for non-existant owner. Update usage of
MethodDef.CreateSignature .
* ExternMethodRef.cs (ExternMethodRef.ctor): Add 'gen_param_count' param.
(ExternMethodRef.Resolve): Update usage of PEFile.AddMethodToTypeSpec and .AddMethod
* GenericMethodRef.cs (GenericMethodRef.PeapiMethod): Return PEAPI.Method obtained in
.Resolve .
* GenericTypeRef.cs (GenericTypeRef.GetMethodRef): Update.
* MethodPointerTypeRef.cs (MethodPointerTypeRef.GetMethodRef): Likewise.
* TypeSpecMethodRef.cs (TypeSpecMethodRef.ctor): Add 'gen_param_count' param.
(TypeSpecMethodRef.Resolve): Update usage of PEFile.AddMethodToTypeSpec .
* MethodDef.cs (MethodDef.ctor): Add 'typars_list' param.
(MethodDef.AddGenericParam): Replace ..
(MethodDef.AddGenericParams): .. with this.
(MethodDef.GenParamCount): New.
(MethodDef.GetGenericParamNum): New. Returns index for a given method type parameter name.
(MethodDef.ResolveGenParams): Resolves type parameter names in the parameter
list to their corresponding indices.
(MethodDef.ResolveGenParam): Resolves a give type parameter to its corresponding
index.
(MethodDef.CreateSignature): Add 'gen_param_count' param.
* TypeRef.cs (TypeRef.GetMethodRef): Update.
* ExternTypeRef.cs (ExternTypeRef.GetMethodRef): Likewise.
* PrimitiveTypeRef.cs (PrimitiveTypeRef.GetMethodRef): Likewise.
2005-12-05 Ankit Jain <jankit@novell.com>
* TypeDef.cs (TypeDef.GenericInfo.num): New.
(TypeDef.AddGenericParam): Set num for GenericInfo.
* MethodDef.cs (MethodDef.GenericInfo.num): New.
(MethodDef.AddGenericParam): Set num for GenericInfo.
* GenericTypeRef.cs (GenericTypeRef.ctor): Update to use PEAPI.GenParam
instead of PEAPI.MVar and PEAPI.GenericTypeSpec.
2005-11-28 Ankit Jain <jankit@novell.com>
* ExternTypeRef.cs (extern_table): Remove unused field.
(.ctor): Remove parameter for extern_table. Update usage accordingly.
* ExternTable.cs (IScope): Remove unused 'table' parameter.
(ExternRef): Change IScope interface implementation accordingly. Update
call to ExternTypeRef.ctor for the previous change.
2005-09-15 Ankit Jain <jankit@novell.com>
* DeclSecurity.cs (IDeclSecurityTarget.AddDeclSecurity): Remove.
(IDeclSecurityTarget.AddPermission),
(IDeclSecurityTarget.AddPermissionSet): New.
(DeclSecurity.IDeclSecurityTarget): Implement new interface methods.
(DeclSecurity.sec_action),
(DeclSecurity.data): Remove.
(DeclSecurity.permissionset_table): New.
(DeclSecurity.ctor): Replace parameterized constructor with a default one.
(DeclSecurity.AddTo): AddDeclSecurity for all Security Actions in the permissionset_table.
* TypeDef.cs (TypeDef.declsecurity_list): Remove.
(TypeDef.decl_sec): New.
(TypeDef.IDeclSecurityTarget): Implement new interface methods.
(TypeDef.DefineContents): Use new decl_sec instead of declsecurity_list.
* CodeGen.cs (CodeGen.assembly_declsec): Change type from ArrayList to DeclSecurity.
(CodeGen.EndAssemblyRef): Set current_customattrtarget and current_declsectarget to null.
(CodeGen.IDeclSecurityTarget): Implement new interface methods.
(CodeGen.Write): Add assembly_declsec to the assembly (using DeclSecurity.AddTo).
* ExternTable.cs (ExternAssembly.declsec_list): Remove.
(ExternAssembly.decl_sec): New.
(ExternAssembly.Resolve): Use new decl_sec instead of declsec_list.
(ExternAssembly.IDeclSecurityTarget): Implement new interface methods.
* MethodDef.cs (MethodDef.declsecurity_list): Remove.
(MethodDef.decl_sec): New.
(MethodDef.IDeclSecurityTarget): Implement new interface methods.
(MethodDef.WriteCode): Use new decl_sec instead of declsecurity_list.
* ExternTypeRef.cs (ExternTypeRef.GetReflectedType): New.
2005-09-08 Ankit Jain <jankit@novell.com>
* CodeGen.cs (CodeGen.stack_reserve): New.
(CodeGen.SetStackReserve): New.
(CodeGen.Write): SetStackReserve on the pefile.
2005-09-06 Ankit Jain <jankit@novell.com>
* ExternTable.cs (ExternRef.is_resolved): New.
(ExternModule.Resolve, ExternAssembly.Resolve,
ExternTable.Resolve): Return if is_resolved. Set to true at the end.
2005-08-29 Ankit Jain <jankit@novell.com>
* InstrTable.cs (inst_table): Comment out stelem and ldelem opcodes.
2005-08-26 Ankit Jain <jankit@novell.com>
* ExternTable.cs (IScope): New. Interface for ResolutionScope.
(ExternRef): Implement IScope.
(ExternRef.GetTypeRef): Handle references to nested classes.
(ExternRef.GetValueType): Remove. Logic combined with GetType.
(ExternRef.GetType): Add param 'is_valuetype' and handle accordingly.
* ExternTypeRef.cs (ExternTypeRef): Implement IScope.
(ExternTypeRef.extern_ref),
(ExternTypeRef.ctor),
(ExternTypeRef.ExternRef): Change extern_ref type from ExternRef to IScope.
(ExternTypeRef.nestedtypes_table),
(ExternTypeRef.nestedclass_table): New. Hashtables for nested classes.
(ExternTypeRef.Resolve): Resolve parent if it is ExternTypeRef type.
(ExternTypeRef.GetTypeRef): New.
(ExternTypeRef.GetExternTypeRef): New. Returns the resolve PEAPI type.
(ExternTypeRef.GetType): New.
2005-08-23 Ankit Jain <jankit@novell.com>
* ExternTable.cs (ExternTable.ctor): Remove. Move the initialization code
to the new method AddCorlib.
(ExternTable.AddCorlib): New.
(ExternTable.Resolve): Assembly_table can be null so check before using it.
(ExternTable.GetTypeRef): AddCorlib if mscorlib is being referenced but
assembly_table is still null.
* CodeGen.cs (CodeGen.SetAssemblyName): Call AddCorlib if name is not mscorlib.
(CodeGen.Write): Pass null for new outputDir param for PEFile ctor.
* (PrimitiveTypeRef.Name): New. Returns the full_name.
2005-08-18 Ankit Jain <jankit@novell.com>
* IMethodRef.cs (IMethodRef.Owner): New. Returns owner of the method.
* GlobalMethodRef.cs (GlobalMethodRef),
MethodRef.cs (MethodRef),
ExternMethodRef.cs (ExternMethodRef),
GenericMethodRef.cs (GenericMethodRef),
TypeSpecMethodRef.cs (TypeSpecMethodRef): Implement IMethodRef.Owner.
* CustomAttr.cs (CustomAttr.IsSuppressUnmanaged): New. Checks if the
it is a "System.Security.SuppressUnmanagedCodeSecurityAttribute" and
is from "mscorlib" or the current assembly is mscorlib itself.
* TypeDef.cs (TypeDef.DefineContents),
MethodDef.cs (MethodDef.WriteCode): Set HasSecurity attribute if
SuppressUnmanagedCodeSecurity custom attribute is present.
* ExternTable.cs (ExternRef.Name): New.
* ExternTypeRef.cs (ExternTypeRef.ExternRef): New. Returns the corresponding
extern ref.
2005-08-18 Ankit Jain <jankit@novell.com>
* MethodDef.cs (MethodDef.WriteCode): Process custom attributes and decl security
lists even for abstract methods.
2005-08-16 Ankit Jain <jankit@novell.com>
* CodeGen.cs (CodeGen.current_field_native_type): New.
(CodeGen.AddFieldMarshalInfo): New. Add marshal info for the current field.
(CodeGen.AddFieldDef): Add marshal info for the field.
* FieldDef.cs (FieldDef.native_type): New. Native type for marshalling.
(FieldDef.AddMarshalInfo): New. Set native_type.
(FieldDef.Resolve): Set MarshalInfo for field_def.
* MethodDef.cs (MethodDef.ret_native_type): New. Native type for return type.
(MethodDef.AddRetTypeMarshalInfo): New.
(MethodDef.EntryPoint): Throw exception is the method is not static.
(MethodDef.Resolve): Call overload with class_def=null.
(MethodDef.Resolve): Add global methods to code_gen.PEFile.
Add marshal info for return type.
* ParamDef.cs (ParamDef.native_type): New. Native type for marshalling.
(ParamDef.AddMarshalInfo): New.
(ParamDef.Define): Add marshal info to peapi_param.
2005-08-08 Ankit Jain <jankit@novell.com>
* ExternTypeRef.cs (ExternTypeRef.Clone): Use full_name instead of FullName
to avoid cloning modifiers (like []).
2005-08-08 Ankit Jain <jankit@novell.com>
* CodeGen.cs (CodeGen.entry_point): New bool field.
(CodeGen.HasEntryPoint): New. Property to mark that the assembly
has an entrypoint.
(CodeGen.Write): Throw Exception if an EXE has been requested but the
source file has no entrypoint defined.
2005-08-05 Ankit Jain <jankit@novell.com>
* DeclSecurity.cs: New File.
(DeclSecurity): New class.
(IDeclSecurityTarget): New interface.
* TypeDef.cs (TypeDef): Implement IDeclSecurityTarget.
(TypeDef.DefineContents): Add DeclSecurity info.
* CodeGen.cs (CurrentDeclSecurityTarget): New. Property for current
DeclSecurity target.
(BeginTypeDef, BeginMethodDef, BeginAssemblyRef): Set current DeclSecurity
target accordingly.
(AddAssemblyDeclSecurity): New. Add DeclSecurity info to assembly.
* ExternTable.cs (ExternAssembly): Implement IDeclSecurityTarget.
(Resolve): Add DeclSecurity info to AssemblyRef.
* MethodDef.cs (MethodDef): Implement IDeclSecurityTarget.
(WriteCode): Add DeclSecurity info to MethodDef.
2005-08-03 Ankit Jain <jankit@novell.com>
* GlobalMethodRef.cs (GlobalMethodRef.Resolve): Use CreateVarargSignature
to create method's signature for a vararg method.
2005-08-02 Ankit Jain <ankit@corewars.org>
Fix #61512.
* TypeDef.cs (TypeDef.Define): Use default values for pack and size if only
one of them is unspecified.
2005-05-10 Ankit Jain <ankit@corewars.org>
Fix #74768.
* ExternTable.cs (ExternRef.GetTypeRef): Make ValueClass if requested.
Hack alongwith Hari.
2005-05-06 Ankit Jain <ankit@corewars.org>
* MethodDef.cs (MethodDef.GetNamedParamPos): Param num starts from 1 for instance
methods.
* CodeGen.cs (CodeGen.BeginTypeDef): Set current_customattrtarget when reopening a
class.
2005-04-27 Ankit Jain <ankit@corewars.org>
* ExternTypeRefInst.cs (ExternTypeRefInst.GetMethodRef): Use method_table to avoid
creating duplicates.
* PrimitiveTypeRef.cs (PrimitiveTypeRef.GetMethodRef): Use method_table to avoid
creating duplicates
* PeapiTypeRef.cs (Pair): New class. Tuple of PEAPI.Type and string.
(PeapiTypeRef.type_table): New.
(PeapiTypeRef.MakeArray, MakeBoundArray, MakeManagedPointer, MakeUnmanagedPointer,
MakeCustomModified): Use type_table to avoid creating duplicates.
2005-04-22 Atsushi Enomoto <atsushi@ximian.com>
* InstrTable.cs :
ble.un.s and blt.un.s were incorrectly added to the table.
2005-04-22 Ankit Jain <ankit@corewars.org>
* TypeSpecMethodRef.cs (TypeSpecMethodRef.Resolve): Set is_resolved
to true.
2005-04-18 Ankit Jain <ankit@corewars.org>
* CodeGen.cs (CodeGen.AddManifestResource): Add a
ManifestResource to manifestResources ArrayList.
(CodeGen.Write): Add all resources to the pefile.
2005-04-12 Ankit Jain <ankit@corewars.org>
* CustomAttr.cs (ICustomAttrTarget): New interface.
* TypeDef.cs: Implement ICustomAttrTarget.
* FieldDef.cs, PropertyDef.cs, ParamDef.cs, EventDef.cs
(AddCustomAttribute): Implement ICustomAttrTarget
(.Resolve): Add custom attributes.
* CodeGen.cs (CurrentCustomAttrTarget): New. Property for
current CustomAttr target.
(BeginTypeDef, BeginMethodDef, BeginAssemblyRef): Set
current_customattrtarget accordingly.
* ExternTable.cs (ExternRef): Implement ICustomAttrTarget.
(ExternModule.Resolve): Add custom attributes to ModuleRef.
(ExternAssembly.Resolve): Add custom attributes to AssemblyRef.
* MethodDef.cs: Implement ICustomAttrTarget and add custom
attributes.
(GetParam): New. Get ParamDef by index.
2005-04-08 Ankit Jain <radical@corewars.org>
* MethodDef.cs (named_param_table, CreateNamedParamTable): Remove.
(GetNamedParamPos): Implement using a linear scan.
* TypeDef.cs (TypeDef): Initialize 'is_enum_class'.
(Define): Set 'is_value_class' or 'is_enum_class' depending on
whether the parent is System.ValueType or System.Enum. Update to
changes in PEAPI.cs.
2005-03-17 Ankit Jain <radical@corewars.org>
* MethodDef.cs: Added method AddParamDefaultValue for adding DefaultValue
to a method parameter.
* ParamDef.cs: Added method AddDefaultValue and handling of default value.
2005-02-07 Jackson Harper <jackson@ximian.com>
* MethodDef.cs: Don't die on duplicate local symbols. Fixes bug
72149. Patch by Sohail Somani.
2004-12-14 Raja R Harinath <rharinath@novell.com>
* MethodDef.cs (CreateSignature): Add a space in generated signature.
2004-12-02 Jackson Harper <jackson@ximian.com>
* ExternTypeRefInst.cs: When converting to arrays we loose our valuetypedness.
2004-12-02 Jackson Harper <jackson@ximian.com>
* MethodDef.cs: Abstract methods don't get bodies. Even if there
are bodies there.
2004-12-02 Jackson Harper <jackson@ximian.com>
* MethodDef.cs: If the type is an interface auto set fields to
static (and give a warning if they are not static), and set
methods to abstract virtual (and give warning if they were not already).
* FieldDef.cs:
* TypeDef.cs: Accessors and convience properties for getting and
setting the method/field attributes.
2004-12-02 Jackson Harper <jackson@ximian.com>
* FieldDef.cs: Set the underlying type for bytearray data constants. This
fixes bug #70153 and #70154 which my previous fix caused.
2004-08-01 Atsushi Enomoto <atsushi@ximian.com>
* DebuggingInfo.cs : csc build fix (see bug #62230).
2004-07-27 Martin Baulig <martin@ximian.com>
* IInstr.cs (IInstr): Made this an abstract class and not an
interface, added a .ctor which takes a Location.
(IInstr.Location): New public readonly field.
* CodeGen.cs (CodeGen.SymbolWriter): New public property.
(CodeGen.BeginSourceFile, EndSourceFile): New public methods.
(CodeGen.EndMethodDef): Take a `Location' argument.
(CodeGen.Write): Create debugging info if the user requested it.
* MethodDef.cs (MethodDef.ctor): Added `CodeGen codegen' and
`Location start' arguments. If the user requested debugging
information, register ourselves with the symbol writer.
(MethodDef.WriteCode): Emit debugging information.
* DebuggingInfo.cs: New file.
2004-07-23 Jackson Harper <jackson@ximian.com>
* MethodDef.cs: Params are 1 based if the method is instance
because of the 'this' arg.
2004-07-21 Jackson Harper <jackson@ximian.com>
* ExternTypeRefInst.cs: Use the PeapiType so that modified types
will actually work. Add a Clone method so that type ref insts
aren't duplicated making them modified multiple times.
2004-07-12 Jackson Harper <jackson@ximian.com>
* MethodDef.cs: Local lists are not lazyily allocated so they were
getting added to every method. This is legal but wastes space.
2004-07-08 Jackson Harper <jackson@ximian.com>
* CodeGen.cs: Add assembly custom attributes to the pe file.
* CustomAttr.cs: Custom attributes are now added through the
pefile, this ensures that they get emitted properly.
* ExternTable.cs: Allow adding custom attributes to assembly
refs.
2004-06-26 Jackson Harper <jackson@ximian.com>
* TypeDef.cs: Preserve the order of fields in a class. Then after
all the fields have been defined reset the order in PEAPI to the
correct order. This is done so sequential layouts actually
work. The order needs to be reset because it can be lost during
the recursive definition phase.
* MethodDef.cs: Use and ExternModule for pinvoke data's module
refs. This way we don't get duplicate module refs.
2004-06-24 Jackson Harper <jackson@ximian.com>
* MethodDef.cs: Report when defining methods just like MS.
* TypeDef.cs: Error message when we can't find a locla method.