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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
|
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
//----------------------------------------------------------
// MethodContext.h - Primary structure to store all the EE-JIT details required to replay creation of a method
// CompileResult contains the stuff generated by a compilation
//----------------------------------------------------------
#ifndef _MethodContext
#define _MethodContext
#include "runtimedetails.h"
#include "compileresult.h"
#include "lightweightmap.h"
#include "errorhandling.h"
#define METHOD_IDENTITY_INFO_SIZE 0x10000 // We assume that the METHOD_IDENTITY_INFO_SIZE will not exceed 64KB
#define MD5_HASH_BYTE_SIZE 16 // MD5 is 128-bit, so we need 16 bytes to store it
#define MD5_HASH_BUFFER_SIZE 33 // MD5 is 128-bit, so we need 32 chars + 1 char to store null-terminator
class MethodContext
{
public:
#pragma pack(push, 1)
struct Agnostic_CORINFO_SIG_INFO
{
DWORD callConv;
DWORDLONG retTypeClass;
DWORDLONG retTypeSigClass;
DWORD retType;
DWORD flags;
DWORD numArgs;
DWORD sigInst_classInstCount;
DWORD sigInst_classInst_Index;
DWORD sigInst_methInstCount;
DWORD sigInst_methInst_Index;
DWORDLONG args;
DWORD pSig_Index;
DWORD cbSig;
DWORDLONG scope;
DWORD token;
};
struct Agnostic_CORINFO_METHOD_INFO
{
DWORDLONG ftn;
DWORDLONG scope;
DWORD ILCode_offset;
DWORD ILCodeSize;
DWORD maxStack;
DWORD EHcount;
DWORD options;
DWORD regionKind;
Agnostic_CORINFO_SIG_INFO args;
Agnostic_CORINFO_SIG_INFO locals;
};
struct Agnostic_CompileMethod
{
Agnostic_CORINFO_METHOD_INFO info;
DWORD flags;
};
struct Agnostic_InitClass
{
DWORDLONG field;
DWORDLONG method;
DWORDLONG context;
DWORD speculative;
};
struct DLDL
{
DWORDLONG A;
DWORDLONG B;
};
struct Agnostic_CanInline
{
DWORD Restrictions;
DWORD result;
DWORD exceptionCode;
};
struct Agnostic_GetClassGClayout
{
DWORD gcPtrs_Index;
DWORD len;
DWORD valCount;
};
struct DLD
{
DWORDLONG A;
DWORD B;
};
struct DLDD
{
DWORDLONG A;
DWORD B;
DWORD C;
};
struct Agnostic_CORINFO_RESOLVED_TOKENin
{
DWORDLONG tokenContext;
DWORDLONG tokenScope;
DWORD token;
DWORD tokenType;
};
struct Agnostic_CORINFO_RESOLVED_TOKENout
{
DWORDLONG hClass;
DWORDLONG hMethod;
DWORDLONG hField;
DWORD pTypeSpec_Index;
DWORD cbTypeSpec;
DWORD pMethodSpec_Index;
DWORD cbMethodSpec;
};
struct GetArgTypeValue
{
DWORD flags;
DWORD numArgs;
DWORD sigInst_classInstCount;
DWORD sigInst_classInst_Index;
DWORD sigInst_methInstCount;
DWORD sigInst_methInst_Index;
DWORDLONG scope;
DWORDLONG args;
};
struct GetArgClassValue
{
DWORD sigInst_classInstCount;
DWORD sigInst_classInst_Index;
DWORD sigInst_methInstCount;
DWORD sigInst_methInst_Index;
DWORDLONG scope;
DWORDLONG args;
};
struct Agnostic_GetBoundaries
{
DWORD cILOffsets;
DWORD pILOffset_offset;
DWORD implicitBoundaries;
};
struct Agnostic_CORINFO_EE_INFO
{
struct Agnostic_InlinedCallFrameInfo
{
DWORD size;
DWORD offsetOfGSCookie;
DWORD offsetOfFrameVptr;
DWORD offsetOfFrameLink;
DWORD offsetOfCallSiteSP;
DWORD offsetOfCalleeSavedFP;
DWORD offsetOfCallTarget;
DWORD offsetOfReturnAddress;
} inlinedCallFrameInfo;
DWORD offsetOfThreadFrame;
DWORD offsetOfGCState;
DWORD offsetOfDelegateInstance;
DWORD offsetOfDelegateFirstTarget;
DWORD offsetOfSecureDelegateIndirectCell;
DWORD offsetOfTransparentProxyRP;
DWORD offsetOfRealProxyServer;
DWORD offsetOfObjArrayData;
DWORD sizeOfReversePInvokeFrame;
DWORD osPageSize;
DWORD maxUncheckedOffsetForNullObject;
DWORD targetAbi;
DWORD osType;
DWORD osMajor;
DWORD osMinor;
DWORD osBuild;
};
struct Agnostic_GetFieldAddress
{
DWORDLONG ppIndirection;
DWORDLONG fieldAddress;
DWORD fieldValue;
};
struct Agnostic_GetStaticFieldCurrentClass
{
DWORDLONG classHandle;
bool isSpeculative;
};
struct Agnostic_CORINFO_RESOLVED_TOKEN
{
Agnostic_CORINFO_RESOLVED_TOKENin inValue;
Agnostic_CORINFO_RESOLVED_TOKENout outValue;
};
struct Agnostic_GetFieldInfo
{
Agnostic_CORINFO_RESOLVED_TOKEN ResolvedToken;
DWORDLONG callerHandle;
DWORD flags;
};
struct Agnostic_CORINFO_HELPER_ARG
{
DWORDLONG constant; // one view of a large union of ptr size
DWORD argType;
};
struct Agnostic_CORINFO_HELPER_DESC
{
DWORD helperNum;
DWORD numArgs;
Agnostic_CORINFO_HELPER_ARG args[CORINFO_ACCESS_ALLOWED_MAX_ARGS];
};
struct Agnostic_CORINFO_CONST_LOOKUP
{
DWORD accessType;
DWORDLONG handle; // actually a union of two pointer sized things
};
struct Agnostic_CORINFO_LOOKUP_KIND
{
DWORD needsRuntimeLookup;
DWORD runtimeLookupKind;
WORD runtimeLookupFlags;
};
struct Agnostic_CORINFO_RUNTIME_LOOKUP
{
DWORDLONG signature;
DWORD helper;
DWORD indirections;
DWORD testForNull;
DWORD testForFixup;
DWORDLONG offsets[CORINFO_MAXINDIRECTIONS];
DWORD indirectFirstOffset;
DWORD indirectSecondOffset;
};
struct Agnostic_CORINFO_LOOKUP
{
Agnostic_CORINFO_LOOKUP_KIND lookupKind;
Agnostic_CORINFO_RUNTIME_LOOKUP runtimeLookup; // This and constLookup actually a union, but with different
// layouts.. :-| copy the right one based on lookupKinds value
Agnostic_CORINFO_CONST_LOOKUP constLookup;
};
struct Agnostic_CORINFO_FIELD_INFO
{
DWORD fieldAccessor;
DWORD fieldFlags;
DWORD helper;
DWORD offset;
DWORD fieldType;
DWORDLONG structType;
DWORD accessAllowed;
Agnostic_CORINFO_HELPER_DESC accessCalloutHelper;
Agnostic_CORINFO_CONST_LOOKUP fieldLookup;
};
struct DD
{
DWORD A;
DWORD B;
};
struct DDD
{
DWORD A;
DWORD B;
DWORD C;
};
struct Agnostic_CanTailCall
{
DWORDLONG callerHnd;
DWORDLONG declaredCalleeHnd;
DWORDLONG exactCalleeHnd;
WORD fIsTailPrefix;
};
struct Agnostic_Environment
{
DWORD name_index;
;
DWORD val_index;
};
struct Agnostic_GetCallInfo
{
Agnostic_CORINFO_RESOLVED_TOKEN ResolvedToken;
Agnostic_CORINFO_RESOLVED_TOKEN ConstrainedResolvedToken;
DWORDLONG callerHandle;
DWORD flags;
};
struct Agnostic_CORINFO_CALL_INFO
{
DWORDLONG hMethod;
DWORD methodFlags;
DWORD classFlags;
Agnostic_CORINFO_SIG_INFO sig;
DWORD verMethodFlags;
Agnostic_CORINFO_SIG_INFO verSig;
DWORD accessAllowed;
Agnostic_CORINFO_HELPER_DESC callsiteCalloutHelper;
DWORD thisTransform;
DWORD kind;
DWORD nullInstanceCheck;
DWORDLONG contextHandle;
DWORD exactContextNeedsRuntimeLookup;
Agnostic_CORINFO_LOOKUP stubLookup; // first view of union. others are matching or subordinate
Agnostic_CORINFO_CONST_LOOKUP instParamLookup;
DWORD secureDelegateInvoke;
DWORD exceptionCode;
};
struct Agnostic_GetMethodInfo
{
Agnostic_CORINFO_METHOD_INFO info;
bool result;
DWORD exceptionCode;
};
struct Agnostic_FindSig
{
DWORDLONG module;
DWORD sigTOK;
DWORDLONG context;
};
struct PInvokeMarshalingRequiredValue
{
DWORDLONG method;
DWORD pSig_Index;
DWORD cbSig;
DWORDLONG scope;
};
struct Agnostic_CORINFO_EH_CLAUSE
{
DWORD Flags;
DWORD TryOffset;
DWORD TryLength;
DWORD HandlerOffset;
DWORD HandlerLength;
DWORD ClassToken; // first view of a two dword union
};
struct Agnostic_GetVars
{
DWORD cVars;
DWORD vars_offset;
DWORD extendOthers;
};
struct Agnostic_CanAccessClassIn
{
Agnostic_CORINFO_RESOLVED_TOKEN ResolvedToken;
DWORDLONG callerHandle;
};
struct Agnostic_CanAccessClassOut
{
Agnostic_CORINFO_HELPER_DESC AccessHelper;
DWORD result;
};
struct Agnostic_AppendClassName
{
DWORDLONG classHandle;
DWORD fNamespace;
DWORD fFullInst;
DWORD fAssembly;
};
struct Agnostic_CheckMethodModifier
{
DWORDLONG hMethod;
DWORD modifier;
DWORD fOptional;
};
struct Agnostic_EmbedGenericHandle
{
Agnostic_CORINFO_RESOLVED_TOKEN ResolvedToken;
DWORD fEmbedParent;
};
struct Agnostic_CORINFO_GENERICHANDLE_RESULT
{
Agnostic_CORINFO_LOOKUP lookup;
DWORDLONG compileTimeHandle;
DWORD handleType;
};
struct Agnostic_GetDelegateCtorIn
{
DWORDLONG methHnd;
DWORDLONG clsHnd;
DWORDLONG targetMethodHnd;
};
struct Agnostic_DelegateCtorArgs
{
DWORDLONG pMethod;
DWORDLONG pArg3;
DWORDLONG pArg4;
DWORDLONG pArg5;
};
struct Agnostic_GetDelegateCtorOut
{
Agnostic_DelegateCtorArgs CtorData;
DWORDLONG result;
};
struct Agnostic_FindCallSiteSig
{
DWORDLONG module;
DWORD methTok;
DWORDLONG context;
};
struct Agnostic_GetNewHelper
{
DWORDLONG hClass;
DWORDLONG callerHandle;
};
struct Agnostic_GetCastingHelper
{
DWORDLONG hClass;
DWORD fThrowing;
};
struct Agnostic_GetClassModuleIdForStatics
{
DWORDLONG Module;
DWORDLONG pIndirection;
DWORDLONG result;
};
struct Agnostic_IsCompatibleDelegate
{
DWORDLONG objCls;
DWORDLONG methodParentCls;
DWORDLONG method;
DWORDLONG delegateCls;
};
struct Agnostic_GetBBProfileData
{
DWORD count;
DWORD profileBuffer_index;
DWORD numRuns;
DWORD result;
};
struct Agnostic_GetProfilingHandle
{
DWORD bHookFunction;
DWORDLONG ProfilerHandle;
DWORD bIndirectedHandles;
};
struct Agnostic_GetTailCallCopyArgsThunk
{
Agnostic_CORINFO_SIG_INFO Sig;
DWORD flags;
};
struct Agnostic_GetArgClass_Value
{
DWORDLONG result;
DWORD exceptionCode;
};
struct Agnostic_GetArgType_Value
{
DWORDLONG vcTypeRet;
DWORD result;
DWORD exceptionCode;
};
// Agnostic_ConfigIntInfo combines as a single key the name
// and defaultValue of a integer config query.
// Note: nameIndex is treated as a DWORD index to the name string.
struct Agnostic_ConfigIntInfo
{
DWORD nameIndex;
DWORD defaultValue;
};
// SYSTEMV_AMD64_CORINFO_STRUCT_REG_PASSING_DESCRIPTOR
struct Agnostic_GetSystemVAmd64PassStructInRegisterDescriptor
{
DWORD passedInRegisters; // Whether the struct is passable/passed (this includes struct returning) in registers.
DWORD eightByteCount; // Number of eightbytes for this struct.
DWORD eightByteClassifications[CLR_SYSTEMV_MAX_EIGHTBYTES_COUNT_TO_PASS_IN_REGISTERS]; // The eightbytes type
// classification.
DWORD eightByteSizes[CLR_SYSTEMV_MAX_EIGHTBYTES_COUNT_TO_PASS_IN_REGISTERS]; // The size of the eightbytes (an
// eightbyte could include padding.
// This represents the no padding
// size of the eightbyte).
DWORD eightByteOffsets[CLR_SYSTEMV_MAX_EIGHTBYTES_COUNT_TO_PASS_IN_REGISTERS]; // The start offset of the
// eightbytes (in bytes).
DWORD result;
};
struct Agnostic_ResolveVirtualMethod
{
DWORDLONG virtualMethod;
DWORDLONG implementingClass;
DWORDLONG ownerType;
};
struct ResolveTokenValue
{
Agnostic_CORINFO_RESOLVED_TOKENout tokenOut;
DWORD exceptionCode;
};
struct TryResolveTokenValue
{
Agnostic_CORINFO_RESOLVED_TOKENout tokenOut;
DWORD success;
};
struct GetTokenTypeAsHandleValue
{
DWORDLONG hMethod;
DWORDLONG hField;
};
struct GetVarArgsHandleValue
{
DWORD cbSig;
DWORD pSig_Index;
DWORDLONG scope;
DWORD token;
};
struct CanGetVarArgsHandleValue
{
DWORDLONG scope;
DWORD token;
};
struct GetCookieForPInvokeCalliSigValue
{
DWORD cbSig;
DWORD pSig_Index;
DWORDLONG scope;
DWORD token;
};
struct CanGetCookieForPInvokeCalliSigValue
{
DWORDLONG scope;
DWORD token;
};
struct GetReadyToRunHelper_TOKENin
{
Agnostic_CORINFO_RESOLVED_TOKEN ResolvedToken;
Agnostic_CORINFO_LOOKUP_KIND GenericLookupKind;
DWORD id;
};
struct GetReadyToRunHelper_TOKENout
{
Agnostic_CORINFO_CONST_LOOKUP Lookup;
bool result;
};
struct GetReadyToRunDelegateCtorHelper_TOKENIn
{
Agnostic_CORINFO_RESOLVED_TOKEN TargetMethod;
DWORDLONG delegateType;
};
#pragma pack(pop)
MethodContext();
private:
MethodContext(HANDLE hFile);
MethodContext(unsigned char* buff, unsigned int totalLen);
void MethodInitHelper(unsigned char* buff, unsigned int totalLen);
void MethodInitHelperFile(HANDLE hFile);
bool Initialize(int loadedCount, unsigned char* buff, DWORD size);
bool Initialize(int loadedCount, HANDLE hFile);
int dumpMD5HashToBuffer(BYTE* pBuffer, int bufLen, char* buff, int len);
public:
static bool Initialize(int loadedCount, unsigned char* buff, DWORD size, /* OUT */ MethodContext** ppmc);
static bool Initialize(int loadedCount, HANDLE hFile, /* OUT */ MethodContext** ppmc);
~MethodContext();
void Destroy();
bool Equal(MethodContext* other);
unsigned int saveToFile(HANDLE hFile);
unsigned int calculateFileSize();
unsigned int calculateRawFileSize();
void dumpToConsole(int mcNumber = -1); // if mcNumber is not -1, display the method context number before the dumped
// info
int dumpStatToBuffer(char* buff, int len);
static int dumpStatTitleToBuffer(char* buff, int len);
int methodSize;
int dumpMethodIdentityInfoToBuffer(char* buff, int len);
int dumpMethodMD5HashToBuffer(char* buff, int len);
void recGlobalContext(const MethodContext& other);
void dmpEnvironment(DWORD key, const Agnostic_Environment& value);
void recCompileMethod(CORINFO_METHOD_INFO* info, unsigned flags);
void dmpCompileMethod(DWORD key, const Agnostic_CompileMethod& value);
void repCompileMethod(CORINFO_METHOD_INFO* info, unsigned* flags);
void recGetMethodClass(CORINFO_METHOD_HANDLE methodHandle, CORINFO_CLASS_HANDLE classHandle);
void dmpGetMethodClass(DWORDLONG key, DWORDLONG value);
CORINFO_CLASS_HANDLE repGetMethodClass(CORINFO_METHOD_HANDLE methodHandle);
void recGetClassAttribs(CORINFO_CLASS_HANDLE classHandle, DWORD attribs);
void dmpGetClassAttribs(DWORDLONG key, DWORD value);
DWORD repGetClassAttribs(CORINFO_CLASS_HANDLE classHandle);
void recGetMethodAttribs(CORINFO_METHOD_HANDLE methodHandle, DWORD attribs);
void dmpGetMethodAttribs(DWORDLONG key, DWORD value);
DWORD repGetMethodAttribs(CORINFO_METHOD_HANDLE methodHandle);
void recGetVars(CORINFO_METHOD_HANDLE ftn, ULONG32* cVars, ICorDebugInfo::ILVarInfo** vars, bool* extendOthers);
void dmpGetVars(DWORDLONG key, const Agnostic_GetVars& value);
void repGetVars(CORINFO_METHOD_HANDLE ftn, ULONG32* cVars, ICorDebugInfo::ILVarInfo** vars, bool* extendOthers);
void recGetBoundaries(CORINFO_METHOD_HANDLE ftn,
unsigned int* cILOffsets,
DWORD** pILOffsets,
ICorDebugInfo::BoundaryTypes* implictBoundaries);
void dmpGetBoundaries(DWORDLONG key, const Agnostic_GetBoundaries& value);
void repGetBoundaries(CORINFO_METHOD_HANDLE ftn,
unsigned int* cILOffsets,
DWORD** pILOffsets,
ICorDebugInfo::BoundaryTypes* implictBoundaries);
void recInitClass(CORINFO_FIELD_HANDLE field,
CORINFO_METHOD_HANDLE method,
CORINFO_CONTEXT_HANDLE context,
BOOL speculative,
CorInfoInitClassResult result);
void dmpInitClass(const Agnostic_InitClass& key, DWORD value);
CorInfoInitClassResult repInitClass(CORINFO_FIELD_HANDLE field,
CORINFO_METHOD_HANDLE method,
CORINFO_CONTEXT_HANDLE context,
BOOL speculative);
void recGetMethodName(CORINFO_METHOD_HANDLE ftn, char* methodname, const char** moduleName);
void dmpGetMethodName(DLD key, DD value);
const char* repGetMethodName(CORINFO_METHOD_HANDLE ftn, const char** moduleName);
void recGetMethodNameFromMetadata(CORINFO_METHOD_HANDLE ftn,
char* methodname,
const char** moduleName,
const char** namespaceName);
void dmpGetMethodNameFromMetadata(DLDD key, DDD value);
const char* repGetMethodNameFromMetadata(CORINFO_METHOD_HANDLE ftn,
const char** className,
const char** namespaceName);
void recGetJitFlags(CORJIT_FLAGS* jitFlags, DWORD sizeInBytes, DWORD result);
void dmpGetJitFlags(DWORD key, DD value);
DWORD repGetJitFlags(CORJIT_FLAGS* jitFlags, DWORD sizeInBytes);
void recGetJitTimeLogFilename(LPCWSTR tempFileName);
void dmpGetJitTimeLogFilename(DWORD key, DWORD value);
LPCWSTR repGetJitTimeLogFilename();
void recCanInline(CORINFO_METHOD_HANDLE callerHnd,
CORINFO_METHOD_HANDLE calleeHnd,
DWORD* pRestrictions,
CorInfoInline response,
DWORD exceptionCode);
void dmpCanInline(DLDL key, const Agnostic_CanInline& value);
CorInfoInline repCanInline(CORINFO_METHOD_HANDLE callerHnd,
CORINFO_METHOD_HANDLE calleeHnd,
DWORD* pRestrictions,
DWORD* exceptionCode);
void recResolveToken(CORINFO_RESOLVED_TOKEN* pResolvedToken, DWORD exceptionCode);
void dmpResolveToken(const Agnostic_CORINFO_RESOLVED_TOKENin& key, const ResolveTokenValue& value);
void repResolveToken(CORINFO_RESOLVED_TOKEN* pResolvedToken, DWORD* exceptionCode);
void recTryResolveToken(CORINFO_RESOLVED_TOKEN* pResolvedToken, bool success);
void dmpTryResolveToken(const Agnostic_CORINFO_RESOLVED_TOKENin& key, const TryResolveTokenValue& value);
bool repTryResolveToken(CORINFO_RESOLVED_TOKEN* pResolvedToken);
void recGetCallInfo(CORINFO_RESOLVED_TOKEN* pResolvedToken,
CORINFO_RESOLVED_TOKEN* pConstrainedResolvedToken,
CORINFO_METHOD_HANDLE callerHandle,
CORINFO_CALLINFO_FLAGS flags,
CORINFO_CALL_INFO* pResult,
DWORD exceptionCode);
void dmpGetCallInfo(const Agnostic_GetCallInfo& key, const Agnostic_CORINFO_CALL_INFO& value);
void repGetCallInfo(CORINFO_RESOLVED_TOKEN* pResolvedToken,
CORINFO_RESOLVED_TOKEN* pConstrainedResolvedToken,
CORINFO_METHOD_HANDLE callerHandle,
CORINFO_CALLINFO_FLAGS flags,
CORINFO_CALL_INFO* pResult,
DWORD* exceptionCode);
void repGetCallInfoFromMethodHandle(CORINFO_METHOD_HANDLE methodHandle, CORINFO_CALL_INFO* pResult);
void recGetIntrinsicID(CORINFO_METHOD_HANDLE method, bool* pMustExpand, CorInfoIntrinsics result);
void dmpGetIntrinsicID(DWORDLONG key, DD value);
CorInfoIntrinsics repGetIntrinsicID(CORINFO_METHOD_HANDLE method, bool* pMustExpand);
void recGetUnmanagedCallConv(CORINFO_METHOD_HANDLE method, CorInfoUnmanagedCallConv result);
void dmpGetUnmanagedCallConv(DWORDLONG key, DWORD result);
CorInfoUnmanagedCallConv repGetUnmanagedCallConv(CORINFO_METHOD_HANDLE method);
void recIsInstantiationOfVerifiedGeneric(CORINFO_METHOD_HANDLE method, CorInfoInstantiationVerification result);
void dmpIsInstantiationOfVerifiedGeneric(DWORDLONG key, DWORD value);
CorInfoInstantiationVerification repIsInstantiationOfVerifiedGeneric(CORINFO_METHOD_HANDLE method);
void recAsCorInfoType(CORINFO_CLASS_HANDLE cls, CorInfoType result);
void dmpAsCorInfoType(DWORDLONG key, DWORD value);
CorInfoType repAsCorInfoType(CORINFO_CLASS_HANDLE cls);
void recIsValueClass(CORINFO_CLASS_HANDLE cls, BOOL result);
void dmpIsValueClass(DWORDLONG key, DWORD value);
BOOL repIsValueClass(CORINFO_CLASS_HANDLE cls);
void recIsStructRequiringStackAllocRetBuf(CORINFO_CLASS_HANDLE cls, BOOL result);
void dmpIsStructRequiringStackAllocRetBuf(DWORDLONG key, DWORD value);
BOOL repIsStructRequiringStackAllocRetBuf(CORINFO_CLASS_HANDLE cls);
void recGetClassSize(CORINFO_CLASS_HANDLE cls, unsigned result);
void dmpGetClassSize(DWORDLONG key, DWORD val);
unsigned repGetClassSize(CORINFO_CLASS_HANDLE cls);
void recGetHeapClassSize(CORINFO_CLASS_HANDLE cls, unsigned result);
void dmpGetHeapClassSize(DWORDLONG key, DWORD val);
unsigned repGetHeapClassSize(CORINFO_CLASS_HANDLE cls);
void recCanAllocateOnStack(CORINFO_CLASS_HANDLE cls, BOOL result);
void dmpCanAllocateOnStack(DWORDLONG key, DWORD val);
BOOL repCanAllocateOnStack(CORINFO_CLASS_HANDLE cls);
void recGetClassNumInstanceFields(CORINFO_CLASS_HANDLE cls, unsigned result);
void dmpGetClassNumInstanceFields(DWORDLONG key, DWORD value);
unsigned repGetClassNumInstanceFields(CORINFO_CLASS_HANDLE cls);
void recGetNewArrHelper(CORINFO_CLASS_HANDLE arrayCls, CorInfoHelpFunc result);
void dmpGetNewArrHelper(DWORDLONG key, DWORD value);
CorInfoHelpFunc repGetNewArrHelper(CORINFO_CLASS_HANDLE arrayCls);
void recGetSharedCCtorHelper(CORINFO_CLASS_HANDLE clsHnd, CorInfoHelpFunc result);
void dmpGetSharedCCtorHelper(DWORDLONG key, DWORD value);
CorInfoHelpFunc repGetSharedCCtorHelper(CORINFO_CLASS_HANDLE clsHnd);
void recGetSecurityPrologHelper(CORINFO_METHOD_HANDLE ftn, CorInfoHelpFunc result);
void dmpGetSecurityPrologHelper(DWORDLONG key, DWORD value);
CorInfoHelpFunc repGetSecurityPrologHelper(CORINFO_METHOD_HANDLE ftn);
void recGetTypeForBox(CORINFO_CLASS_HANDLE cls, CORINFO_CLASS_HANDLE result);
void dmpGetTypeForBox(DWORDLONG key, DWORDLONG value);
CORINFO_CLASS_HANDLE repGetTypeForBox(CORINFO_CLASS_HANDLE cls);
void recGetBoxHelper(CORINFO_CLASS_HANDLE cls, CorInfoHelpFunc result);
void dmpGetBoxHelper(DWORDLONG key, DWORD value);
CorInfoHelpFunc repGetBoxHelper(CORINFO_CLASS_HANDLE cls);
void recGetBuiltinClass(CorInfoClassId classId, CORINFO_CLASS_HANDLE result);
void dmpGetBuiltinClass(DWORD key, DWORDLONG value);
CORINFO_CLASS_HANDLE repGetBuiltinClass(CorInfoClassId classId);
void recGetTypeForPrimitiveValueClass(CORINFO_CLASS_HANDLE cls, CorInfoType result);
void dmpGetTypeForPrimitiveValueClass(DWORDLONG key, DWORD value);
CorInfoType repGetTypeForPrimitiveValueClass(CORINFO_CLASS_HANDLE cls);
void recGetTypeForPrimitiveNumericClass(CORINFO_CLASS_HANDLE cls, CorInfoType result);
void dmpGetTypeForPrimitiveNumericClass(DWORDLONG key, DWORD value);
CorInfoType repGetTypeForPrimitiveNumericClass(CORINFO_CLASS_HANDLE cls);
void recGetParentType(CORINFO_CLASS_HANDLE cls, CORINFO_CLASS_HANDLE result);
void dmpGetParentType(DWORDLONG key, DWORDLONG value);
CORINFO_CLASS_HANDLE repGetParentType(CORINFO_CLASS_HANDLE cls);
void recIsSDArray(CORINFO_CLASS_HANDLE cls, BOOL result);
void dmpIsSDArray(DWORDLONG key, DWORD value);
BOOL repIsSDArray(CORINFO_CLASS_HANDLE cls);
void recIsInSIMDModule(CORINFO_CLASS_HANDLE cls, BOOL result);
void dmpIsInSIMDModule(DWORDLONG key, DWORD value);
BOOL repIsInSIMDModule(CORINFO_CLASS_HANDLE cls);
void recGetFieldClass(CORINFO_FIELD_HANDLE field, CORINFO_CLASS_HANDLE result);
void dmpGetFieldClass(DWORDLONG key, DWORDLONG value);
CORINFO_CLASS_HANDLE repGetFieldClass(CORINFO_FIELD_HANDLE field);
void recGetFieldOffset(CORINFO_FIELD_HANDLE field, unsigned result);
void dmpGetFieldOffset(DWORDLONG key, DWORD value);
unsigned repGetFieldOffset(CORINFO_FIELD_HANDLE field);
void recGetLazyStringLiteralHelper(CORINFO_MODULE_HANDLE handle, CorInfoHelpFunc result);
void dmpGetLazyStringLiteralHelper(DWORDLONG key, DWORD value);
CorInfoHelpFunc repGetLazyStringLiteralHelper(CORINFO_MODULE_HANDLE handle);
void recGetUnBoxHelper(CORINFO_CLASS_HANDLE cls, CorInfoHelpFunc result);
void dmpGetUnBoxHelper(DWORDLONG key, DWORD value);
CorInfoHelpFunc repGetUnBoxHelper(CORINFO_CLASS_HANDLE cls);
void recGetReadyToRunHelper(CORINFO_RESOLVED_TOKEN* pResolvedToken,
CORINFO_LOOKUP_KIND* pGenericLookupKind,
CorInfoHelpFunc id,
CORINFO_CONST_LOOKUP* pLookup,
bool result);
void dmpGetReadyToRunHelper(GetReadyToRunHelper_TOKENin key, GetReadyToRunHelper_TOKENout value);
bool repGetReadyToRunHelper(CORINFO_RESOLVED_TOKEN* pResolvedToken,
CORINFO_LOOKUP_KIND* pGenericLookupKind,
CorInfoHelpFunc id,
CORINFO_CONST_LOOKUP* pLookup);
void recGetReadyToRunDelegateCtorHelper(CORINFO_RESOLVED_TOKEN* pTargetMethod,
CORINFO_CLASS_HANDLE delegateType,
CORINFO_LOOKUP* pLookup);
void dmpGetReadyToRunDelegateCtorHelper(GetReadyToRunDelegateCtorHelper_TOKENIn key,
Agnostic_CORINFO_LOOKUP pLookup);
void repGetReadyToRunDelegateCtorHelper(CORINFO_RESOLVED_TOKEN* pTargetMethod,
CORINFO_CLASS_HANDLE delegateType,
CORINFO_LOOKUP* pLookup);
void recGetHelperFtn(CorInfoHelpFunc ftnNum, void** ppIndirection, void* result);
void dmpGetHelperFtn(DWORD key, DLDL value);
void* repGetHelperFtn(CorInfoHelpFunc ftnNum, void** ppIndirection);
bool fndGetHelperFtn(void* functionAddress, CorInfoHelpFunc* pResult);
void recGetJustMyCodeHandle(CORINFO_METHOD_HANDLE method,
CORINFO_JUST_MY_CODE_HANDLE** ppIndirection,
CORINFO_JUST_MY_CODE_HANDLE result);
void dmpGetJustMyCodeHandle(DWORDLONG key, DLDL value);
CORINFO_JUST_MY_CODE_HANDLE repGetJustMyCodeHandle(CORINFO_METHOD_HANDLE method,
CORINFO_JUST_MY_CODE_HANDLE** ppIndirection);
void recGetFunctionEntryPoint(CORINFO_METHOD_HANDLE ftn,
CORINFO_CONST_LOOKUP* pResult,
CORINFO_ACCESS_FLAGS accessFlags);
void dmpGetFunctionEntryPoint(DLD key, DLD value);
void repGetFunctionEntryPoint(CORINFO_METHOD_HANDLE ftn,
CORINFO_CONST_LOOKUP* pResult,
CORINFO_ACCESS_FLAGS accessFlags);
bool fndGetFunctionEntryPoint(DLD value, CORINFO_METHOD_HANDLE* pResult);
void recConstructStringLiteral(CORINFO_MODULE_HANDLE module, mdToken metaTok, void* ppValue, InfoAccessType result);
void dmpConstructStringLiteral(DLD key, DLD value);
InfoAccessType repConstructStringLiteral(CORINFO_MODULE_HANDLE module, mdToken metaTok, void** ppValue);
void recConvertPInvokeCalliToCall(CORINFO_RESOLVED_TOKEN* pResolvedToken, bool fMustConvert, bool result);
void dmpConvertPInvokeCalliToCall(DLD key, DWORDLONG value);
bool repConvertPInvokeCalliToCall(CORINFO_RESOLVED_TOKEN* pResolvedToken, bool fMustConvert);
void recEmptyStringLiteral(void** ppValue, InfoAccessType result);
void dmpEmptyStringLiteral(DWORD key, DLD value);
InfoAccessType repEmptyStringLiteral(void** ppValue);
void recGetArgType(CORINFO_SIG_INFO* sig,
CORINFO_ARG_LIST_HANDLE args,
CORINFO_CLASS_HANDLE* vcTypeRet,
CorInfoTypeWithMod result,
DWORD exception);
void dmpGetArgType(const GetArgTypeValue& key, const Agnostic_GetArgType_Value& value);
CorInfoTypeWithMod repGetArgType(CORINFO_SIG_INFO* sig,
CORINFO_ARG_LIST_HANDLE args,
CORINFO_CLASS_HANDLE* vcTypeRet,
DWORD* exception);
void recGetArgNext(CORINFO_ARG_LIST_HANDLE args, CORINFO_ARG_LIST_HANDLE result);
void dmpGetArgNext(DWORDLONG key, DWORDLONG value);
CORINFO_ARG_LIST_HANDLE repGetArgNext(CORINFO_ARG_LIST_HANDLE args);
void recGetMethodSig(CORINFO_METHOD_HANDLE ftn, CORINFO_SIG_INFO* sig, CORINFO_CLASS_HANDLE memberParent);
void dmpGetMethodSig(DLDL key, const Agnostic_CORINFO_SIG_INFO& value);
void repGetMethodSig(CORINFO_METHOD_HANDLE ftn, CORINFO_SIG_INFO* sig, CORINFO_CLASS_HANDLE memberParent);
void recGetArgClass(CORINFO_SIG_INFO* sig,
CORINFO_ARG_LIST_HANDLE args,
CORINFO_CLASS_HANDLE result,
DWORD exceptionCode);
void dmpGetArgClass(const GetArgClassValue& key, const Agnostic_GetArgClass_Value& value);
CORINFO_CLASS_HANDLE repGetArgClass(CORINFO_SIG_INFO* sig, CORINFO_ARG_LIST_HANDLE args, DWORD* exceptionCode);
void recGetHFAType(CORINFO_CLASS_HANDLE clsHnd, CorInfoType result);
void dmpGetHFAType(DWORDLONG key, DWORD value);
CorInfoType repGetHFAType(CORINFO_CLASS_HANDLE clsHnd);
void recGetMethodInfo(CORINFO_METHOD_HANDLE ftn, CORINFO_METHOD_INFO* info, bool result, DWORD exceptionCode);
void dmpGetMethodInfo(DWORDLONG key, const Agnostic_GetMethodInfo& value);
bool repGetMethodInfo(CORINFO_METHOD_HANDLE ftn, CORINFO_METHOD_INFO* info, DWORD* exceptionCode);
void recGetNewHelper(CORINFO_RESOLVED_TOKEN* pResolvedToken,
CORINFO_METHOD_HANDLE callerHandle,
CorInfoHelpFunc result);
void dmpGetNewHelper(const Agnostic_GetNewHelper& key, DWORD value);
CorInfoHelpFunc repGetNewHelper(CORINFO_RESOLVED_TOKEN* pResolvedToken, CORINFO_METHOD_HANDLE callerHandle);
void recEmbedGenericHandle(CORINFO_RESOLVED_TOKEN* pResolvedToken,
BOOL fEmbedParent,
CORINFO_GENERICHANDLE_RESULT* pResult);
void dmpEmbedGenericHandle(const Agnostic_EmbedGenericHandle& key,
const Agnostic_CORINFO_GENERICHANDLE_RESULT& value);
void repEmbedGenericHandle(CORINFO_RESOLVED_TOKEN* pResolvedToken,
BOOL fEmbedParent,
CORINFO_GENERICHANDLE_RESULT* pResult);
void recGetEHinfo(CORINFO_METHOD_HANDLE ftn, unsigned EHnumber, CORINFO_EH_CLAUSE* clause);
void dmpGetEHinfo(DLD key, const Agnostic_CORINFO_EH_CLAUSE& value);
void repGetEHinfo(CORINFO_METHOD_HANDLE ftn, unsigned EHnumber, CORINFO_EH_CLAUSE* clause);
void recGetMethodVTableOffset(CORINFO_METHOD_HANDLE method,
unsigned* offsetOfIndirection,
unsigned* offsetAfterIndirection,
bool* isRelative);
void dmpGetMethodVTableOffset(DWORDLONG key, DDD value);
void repGetMethodVTableOffset(CORINFO_METHOD_HANDLE method,
unsigned* offsetOfIndirection,
unsigned* offsetAfterIndirection,
bool* isRelative);
void recResolveVirtualMethod(CORINFO_METHOD_HANDLE virtMethod,
CORINFO_CLASS_HANDLE implClass,
CORINFO_CONTEXT_HANDLE ownerType,
CORINFO_METHOD_HANDLE result);
void dmpResolveVirtualMethod(const Agnostic_ResolveVirtualMethod& key, DWORDLONG value);
CORINFO_METHOD_HANDLE repResolveVirtualMethod(CORINFO_METHOD_HANDLE virtMethod,
CORINFO_CLASS_HANDLE implClass,
CORINFO_CONTEXT_HANDLE ownerType);
void recGetUnboxedEntry(CORINFO_METHOD_HANDLE ftn, bool* requiresInstMethodTableArg, CORINFO_METHOD_HANDLE result);
void dmpGetUnboxedEntry(DWORDLONG key, DLD value);
CORINFO_METHOD_HANDLE repGetUnboxedEntry(CORINFO_METHOD_HANDLE ftn, bool* requiresInstMethodTableArg);
void recGetDefaultEqualityComparerClass(CORINFO_CLASS_HANDLE cls, CORINFO_CLASS_HANDLE result);
void dmpGetDefaultEqualityComparerClass(DWORDLONG key, DWORDLONG value);
CORINFO_CLASS_HANDLE repGetDefaultEqualityComparerClass(CORINFO_CLASS_HANDLE cls);
void recGetTokenTypeAsHandle(CORINFO_RESOLVED_TOKEN* pResolvedToken, CORINFO_CLASS_HANDLE result);
void dmpGetTokenTypeAsHandle(const GetTokenTypeAsHandleValue& key, DWORDLONG value);
CORINFO_CLASS_HANDLE repGetTokenTypeAsHandle(CORINFO_RESOLVED_TOKEN* pResolvedToken);
void recGetFieldInfo(CORINFO_RESOLVED_TOKEN* pResolvedToken,
CORINFO_METHOD_HANDLE callerHandle,
CORINFO_ACCESS_FLAGS flags,
CORINFO_FIELD_INFO* pResult);
void dmpGetFieldInfo(const Agnostic_GetFieldInfo& key, const Agnostic_CORINFO_FIELD_INFO& value);
void repGetFieldInfo(CORINFO_RESOLVED_TOKEN* pResolvedToken,
CORINFO_METHOD_HANDLE callerHandle,
CORINFO_ACCESS_FLAGS flags,
CORINFO_FIELD_INFO* pResult);
void recEmbedMethodHandle(CORINFO_METHOD_HANDLE handle, void** ppIndirection, CORINFO_METHOD_HANDLE result);
void dmpEmbedMethodHandle(DWORDLONG key, DLDL value);
CORINFO_METHOD_HANDLE repEmbedMethodHandle(CORINFO_METHOD_HANDLE handle, void** ppIndirection);
void recGetFieldAddress(CORINFO_FIELD_HANDLE field, void** ppIndirection, void* result, CorInfoType cit);
void dmpGetFieldAddress(DWORDLONG key, const Agnostic_GetFieldAddress& value);
void* repGetFieldAddress(CORINFO_FIELD_HANDLE field, void** ppIndirection);
void recGetStaticFieldCurrentClass(CORINFO_FIELD_HANDLE field, bool isSpeculative, CORINFO_CLASS_HANDLE result);
void dmpGetStaticFieldCurrentClass(DWORDLONG key, const Agnostic_GetStaticFieldCurrentClass& value);
CORINFO_CLASS_HANDLE repGetStaticFieldCurrentClass(CORINFO_FIELD_HANDLE field, bool* pIsSpeculative);
void recGetClassGClayout(CORINFO_CLASS_HANDLE cls, BYTE* gcPtrs, unsigned len, unsigned result);
void dmpGetClassGClayout(DWORDLONG key, const Agnostic_GetClassGClayout& value);
unsigned repGetClassGClayout(CORINFO_CLASS_HANDLE cls, BYTE* gcPtrs);
void recGetClassAlignmentRequirement(CORINFO_CLASS_HANDLE cls, BOOL fDoubleAlignHint, unsigned result);
void dmpGetClassAlignmentRequirement(DLD key, DWORD value);
unsigned repGetClassAlignmentRequirement(CORINFO_CLASS_HANDLE cls, BOOL fDoubleAlignHint);
void recCanAccessClass(CORINFO_RESOLVED_TOKEN* pResolvedToken,
CORINFO_METHOD_HANDLE callerHandle,
CORINFO_HELPER_DESC* pAccessHelper,
CorInfoIsAccessAllowedResult result);
void dmpCanAccessClass(const Agnostic_CanAccessClassIn& key, const Agnostic_CanAccessClassOut& value);
CorInfoIsAccessAllowedResult repCanAccessClass(CORINFO_RESOLVED_TOKEN* pResolvedToken,
CORINFO_METHOD_HANDLE callerHandle,
CORINFO_HELPER_DESC* pAccessHelper);
void recGetCastingHelper(CORINFO_RESOLVED_TOKEN* pResolvedToken, bool fThrowing, CorInfoHelpFunc result);
void dmpGetCastingHelper(const Agnostic_GetCastingHelper& key, DWORD value);
CorInfoHelpFunc repGetCastingHelper(CORINFO_RESOLVED_TOKEN* pResolvedToken, bool fThrowing);
void recEmbedModuleHandle(CORINFO_MODULE_HANDLE handle, void** ppIndirection, CORINFO_MODULE_HANDLE result);
void dmpEmbedModuleHandle(DWORDLONG key, DLDL value);
CORINFO_MODULE_HANDLE repEmbedModuleHandle(CORINFO_MODULE_HANDLE handle, void** ppIndirection);
void recEmbedClassHandle(CORINFO_CLASS_HANDLE handle, void** ppIndirection, CORINFO_CLASS_HANDLE result);
void dmpEmbedClassHandle(DWORDLONG key, DLDL value);
CORINFO_CLASS_HANDLE repEmbedClassHandle(CORINFO_CLASS_HANDLE handle, void** ppIndirection);
void recPInvokeMarshalingRequired(CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* callSiteSig, BOOL result);
void dmpPInvokeMarshalingRequired(const PInvokeMarshalingRequiredValue& key, DWORD value);
BOOL repPInvokeMarshalingRequired(CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* callSiteSig);
void recFindSig(CORINFO_MODULE_HANDLE module,
unsigned sigTOK,
CORINFO_CONTEXT_HANDLE context,
CORINFO_SIG_INFO* sig);
void dmpFindSig(const Agnostic_FindSig& key, const Agnostic_CORINFO_SIG_INFO& value);
void repFindSig(CORINFO_MODULE_HANDLE module,
unsigned sigTOK,
CORINFO_CONTEXT_HANDLE context,
CORINFO_SIG_INFO* sig);
void recGetEEInfo(CORINFO_EE_INFO* pEEInfoOut);
void dmpGetEEInfo(DWORD key, const Agnostic_CORINFO_EE_INFO& value);
void repGetEEInfo(CORINFO_EE_INFO* pEEInfoOut);
void recGetGSCookie(GSCookie* pCookieVal, GSCookie** ppCookieVal);
void dmpGetGSCookie(DWORD key, DLDL value);
void repGetGSCookie(GSCookie* pCookieVal, GSCookie** ppCookieVal);
void recGetClassModuleIdForStatics(CORINFO_CLASS_HANDLE cls,
CORINFO_MODULE_HANDLE* pModule,
void** ppIndirection,
size_t result);
void dmpGetClassModuleIdForStatics(DWORDLONG key, const Agnostic_GetClassModuleIdForStatics& value);
size_t repGetClassModuleIdForStatics(CORINFO_CLASS_HANDLE cls,
CORINFO_MODULE_HANDLE* pModule,
void** ppIndirection);
void recGetThreadTLSIndex(void** ppIndirection, DWORD result);
void dmpGetThreadTLSIndex(DWORD key, DLD value);
DWORD repGetThreadTLSIndex(void** ppIndirection);
void recGetInlinedCallFrameVptr(void** ppIndirection, const void* result);
void dmpGetInlinedCallFrameVptr(DWORD key, DLDL value);
const void* repGetInlinedCallFrameVptr(void** ppIndirection);
void recGetAddrOfCaptureThreadGlobal(void** ppIndirection, LONG* result);
void dmpGetAddrOfCaptureThreadGlobal(DWORD key, DLDL value);
LONG* repGetAddrOfCaptureThreadGlobal(void** ppIndirection);
void recGetClassDomainID(CORINFO_CLASS_HANDLE cls, void** ppIndirection, unsigned result);
void dmpGetClassDomainID(DWORDLONG key, DLD value);
unsigned repGetClassDomainID(CORINFO_CLASS_HANDLE cls, void** ppIndirection);
void recGetLocationOfThisType(CORINFO_METHOD_HANDLE context, CORINFO_LOOKUP_KIND* result);
void dmpGetLocationOfThisType(DWORDLONG key, const Agnostic_CORINFO_LOOKUP_KIND& value);
CORINFO_LOOKUP_KIND repGetLocationOfThisType(CORINFO_METHOD_HANDLE context);
void recGetDelegateCtor(CORINFO_METHOD_HANDLE methHnd,
CORINFO_CLASS_HANDLE clsHnd,
CORINFO_METHOD_HANDLE targetMethodHnd,
DelegateCtorArgs* pCtorData,
CORINFO_METHOD_HANDLE result);
void dmpGetDelegateCtor(const Agnostic_GetDelegateCtorIn& key, const Agnostic_GetDelegateCtorOut& value);
CORINFO_METHOD_HANDLE repGetDelegateCtor(CORINFO_METHOD_HANDLE methHnd,
CORINFO_CLASS_HANDLE clsHnd,
CORINFO_METHOD_HANDLE targetMethodHnd,
DelegateCtorArgs* pCtorData);
void recGetFunctionFixedEntryPoint(CORINFO_METHOD_HANDLE ftn, CORINFO_CONST_LOOKUP* pResult);
void dmpGetFunctionFixedEntryPoint(DWORDLONG key, const Agnostic_CORINFO_CONST_LOOKUP& value);
void repGetFunctionFixedEntryPoint(CORINFO_METHOD_HANDLE ftn, CORINFO_CONST_LOOKUP* pResult);
void recGetFieldInClass(CORINFO_CLASS_HANDLE clsHnd, INT num, CORINFO_FIELD_HANDLE result);
void dmpGetFieldInClass(DLD key, DWORDLONG value);
CORINFO_FIELD_HANDLE repGetFieldInClass(CORINFO_CLASS_HANDLE clsHnd, INT num);
void recGetFieldType(CORINFO_FIELD_HANDLE field,
CORINFO_CLASS_HANDLE* structType,
CORINFO_CLASS_HANDLE memberParent,
CorInfoType result);
void dmpGetFieldType(DLDL key, DLD value);
CorInfoType repGetFieldType(CORINFO_FIELD_HANDLE field,
CORINFO_CLASS_HANDLE* structType,
CORINFO_CLASS_HANDLE memberParent);
void recGetFieldName(CORINFO_FIELD_HANDLE ftn, const char** moduleName, const char* result);
void dmpGetFieldName(DWORDLONG key, DD value);
const char* repGetFieldName(CORINFO_FIELD_HANDLE ftn, const char** moduleName);
void recCanInlineTypeCheckWithObjectVTable(CORINFO_CLASS_HANDLE cls, BOOL result);
void dmpCanInlineTypeCheckWithObjectVTable(DWORDLONG key, DWORD value);
BOOL repCanInlineTypeCheckWithObjectVTable(CORINFO_CLASS_HANDLE cls);
void recSatisfiesMethodConstraints(CORINFO_CLASS_HANDLE parent, CORINFO_METHOD_HANDLE method, BOOL result);
void dmpSatisfiesMethodConstraints(DLDL key, DWORD value);
BOOL repSatisfiesMethodConstraints(CORINFO_CLASS_HANDLE parent, CORINFO_METHOD_HANDLE method);
void recInitConstraintsForVerification(CORINFO_METHOD_HANDLE method,
BOOL* pfHasCircularClassConstraints,
BOOL* pfHasCircularMethodConstraint);
void dmpInitConstraintsForVerification(DWORDLONG key, DD value);
void repInitConstraintsForVerification(CORINFO_METHOD_HANDLE method,
BOOL* pfHasCircularClassConstraints,
BOOL* pfHasCircularMethodConstraint);
void recIsValidStringRef(CORINFO_MODULE_HANDLE module, unsigned metaTOK, BOOL result);
void dmpIsValidStringRef(DLD key, DWORD value);
BOOL repIsValidStringRef(CORINFO_MODULE_HANDLE module, unsigned metaTOK);
void recGetHelperName(CorInfoHelpFunc funcNum, const char* result);
void dmpGetHelperName(DWORD key, DWORD value);
const char* repGetHelperName(CorInfoHelpFunc funcNum);
void recCanCast(CORINFO_CLASS_HANDLE child, CORINFO_CLASS_HANDLE parent, BOOL result);
void dmpCanCast(DLDL key, DWORD value);
BOOL repCanCast(CORINFO_CLASS_HANDLE child, CORINFO_CLASS_HANDLE parent);
void recGetChildType(CORINFO_CLASS_HANDLE clsHnd, CORINFO_CLASS_HANDLE* clsRet, CorInfoType result);
void dmpGetChildType(DWORDLONG key, DLD value);
CorInfoType repGetChildType(CORINFO_CLASS_HANDLE clsHnd, CORINFO_CLASS_HANDLE* clsRet);
void recGetArrayInitializationData(CORINFO_FIELD_HANDLE field, DWORD size, void* result);
void dmpGetArrayInitializationData(DLD key, DWORDLONG value);
void* repGetArrayInitializationData(CORINFO_FIELD_HANDLE field, DWORD size);
void recFilterException(struct _EXCEPTION_POINTERS* pExceptionPointers, int result);
void dmpFilterException(DWORD key, DWORD value);
int repFilterException(struct _EXCEPTION_POINTERS* pExceptionPointers);
void recHandleException(struct _EXCEPTION_POINTERS* pExceptionPointers);
void dmpHandleException(DWORD key, DWORD value);
void recGetAddressOfPInvokeFixup(CORINFO_METHOD_HANDLE method, void** ppIndirection, void* result);
void dmpGetAddressOfPInvokeFixup(DWORDLONG key, DLDL value);
void* repGetAddressOfPInvokeFixup(CORINFO_METHOD_HANDLE method, void** ppIndirection);
void recGetAddressOfPInvokeTarget(CORINFO_METHOD_HANDLE method, CORINFO_CONST_LOOKUP* pLookup);
void dmpGetAddressOfPInvokeTarget(DWORDLONG key, DLD value);
void repGetAddressOfPInvokeTarget(CORINFO_METHOD_HANDLE method, CORINFO_CONST_LOOKUP* pLookup);
void recSatisfiesClassConstraints(CORINFO_CLASS_HANDLE cls, BOOL result);
void dmpSatisfiesClassConstraints(DWORDLONG key, DWORD value);
BOOL repSatisfiesClassConstraints(CORINFO_CLASS_HANDLE cls);
void recGetMethodHash(CORINFO_METHOD_HANDLE ftn, unsigned result);
void dmpGetMethodHash(DWORDLONG key, DWORD value);
unsigned repGetMethodHash(CORINFO_METHOD_HANDLE ftn);
void recCanTailCall(CORINFO_METHOD_HANDLE callerHnd,
CORINFO_METHOD_HANDLE declaredCalleeHnd,
CORINFO_METHOD_HANDLE exactCalleeHnd,
bool fIsTailPrefix,
bool result);
void dmpCanTailCall(const Agnostic_CanTailCall& key, DWORD value);
bool repCanTailCall(CORINFO_METHOD_HANDLE callerHnd,
CORINFO_METHOD_HANDLE declaredCalleeHnd,
CORINFO_METHOD_HANDLE exactCalleeHnd,
bool fIsTailPrefix);
void recIsCompatibleDelegate(CORINFO_CLASS_HANDLE objCls,
CORINFO_CLASS_HANDLE methodParentCls,
CORINFO_METHOD_HANDLE method,
CORINFO_CLASS_HANDLE delegateCls,
BOOL* pfIsOpenDelegate,
BOOL result);
void dmpIsCompatibleDelegate(const Agnostic_IsCompatibleDelegate& key, DD value);
BOOL repIsCompatibleDelegate(CORINFO_CLASS_HANDLE objCls,
CORINFO_CLASS_HANDLE methodParentCls,
CORINFO_METHOD_HANDLE method,
CORINFO_CLASS_HANDLE delegateCls,
BOOL* pfIsOpenDelegate);
void recIsDelegateCreationAllowed(CORINFO_CLASS_HANDLE delegateHnd, CORINFO_METHOD_HANDLE calleeHnd, BOOL result);
void dmpIsDelegateCreationAllowed(DLDL key, DWORD value);
BOOL repIsDelegateCreationAllowed(CORINFO_CLASS_HANDLE delegateHnd, CORINFO_METHOD_HANDLE calleeHnd);
void recCanSkipMethodVerification(CORINFO_METHOD_HANDLE ftnHandle,
BOOL skip,
CorInfoCanSkipVerificationResult result);
void dmpCanSkipMethodVerification(DLD key, DWORD value);
CorInfoCanSkipVerificationResult repCanSkipMethodVerification(CORINFO_METHOD_HANDLE ftnHandle, BOOL skip);
void recFindCallSiteSig(CORINFO_MODULE_HANDLE module,
unsigned methTOK,
CORINFO_CONTEXT_HANDLE context,
CORINFO_SIG_INFO* sig);
void dmpFindCallSiteSig(const Agnostic_FindCallSiteSig& key, const Agnostic_CORINFO_SIG_INFO& value);
void repFindCallSiteSig(CORINFO_MODULE_HANDLE module,
unsigned methTOK,
CORINFO_CONTEXT_HANDLE context,
CORINFO_SIG_INFO* sig);
void recShouldEnforceCallvirtRestriction(CORINFO_MODULE_HANDLE scope, BOOL result);
void dmpShouldEnforceCallvirtRestriction(DWORDLONG key, DWORD value);
BOOL repShouldEnforceCallvirtRestriction(CORINFO_MODULE_HANDLE scope);
void recGetMethodSync(CORINFO_METHOD_HANDLE ftn, void** ppIndirection, void* result);
void dmpGetMethodSync(DWORDLONG key, DLDL value);
void* repGetMethodSync(CORINFO_METHOD_HANDLE ftn, void** ppIndirection);
void recGetVarArgsHandle(CORINFO_SIG_INFO* pSig, void** ppIndirection, CORINFO_VARARGS_HANDLE result);
void dmpGetVarArgsHandle(const GetVarArgsHandleValue& key, DLDL value);
CORINFO_VARARGS_HANDLE repGetVarArgsHandle(CORINFO_SIG_INFO* pSig, void** ppIndirection);
void recCanGetVarArgsHandle(CORINFO_SIG_INFO* pSig, bool result);
void dmpCanGetVarArgsHandle(const CanGetVarArgsHandleValue& key, DWORD value);
bool repCanGetVarArgsHandle(CORINFO_SIG_INFO* pSig);
void recGetFieldThreadLocalStoreID(CORINFO_FIELD_HANDLE field, void** ppIndirection, DWORD result);
void dmpGetFieldThreadLocalStoreID(DWORDLONG key, DLD value);
DWORD repGetFieldThreadLocalStoreID(CORINFO_FIELD_HANDLE field, void** ppIndirection);
void recGetBBProfileData(CORINFO_METHOD_HANDLE ftnHnd,
ULONG* count,
ICorJitInfo::ProfileBuffer** profileBuffer,
ULONG* numRuns,
HRESULT result);
void dmpGetBBProfileData(DWORDLONG key, const Agnostic_GetBBProfileData& value);
HRESULT repGetBBProfileData(CORINFO_METHOD_HANDLE ftnHnd,
ULONG* count,
ICorJitInfo::ProfileBuffer** profileBuffer,
ULONG* numRuns);
void recMergeClasses(CORINFO_CLASS_HANDLE cls1, CORINFO_CLASS_HANDLE cls2, CORINFO_CLASS_HANDLE result);
void dmpMergeClasses(DLDL key, DWORDLONG value);
CORINFO_CLASS_HANDLE repMergeClasses(CORINFO_CLASS_HANDLE cls1, CORINFO_CLASS_HANDLE cls2);
void recGetCookieForPInvokeCalliSig(CORINFO_SIG_INFO* szMetaSig, void** ppIndirection, LPVOID result);
void dmpGetCookieForPInvokeCalliSig(const GetCookieForPInvokeCalliSigValue& key, DLDL value);
LPVOID repGetCookieForPInvokeCalliSig(CORINFO_SIG_INFO* szMetaSig, void** ppIndirection);
void recCanGetCookieForPInvokeCalliSig(CORINFO_SIG_INFO* szMetaSig, bool result);
void dmpCanGetCookieForPInvokeCalliSig(const CanGetCookieForPInvokeCalliSigValue& key, DWORD value);
bool repCanGetCookieForPInvokeCalliSig(CORINFO_SIG_INFO* szMetaSig);
void recCanAccessFamily(CORINFO_METHOD_HANDLE hCaller, CORINFO_CLASS_HANDLE hInstanceType, BOOL result);
void dmpCanAccessFamily(DLDL key, DWORD value);
BOOL repCanAccessFamily(CORINFO_METHOD_HANDLE hCaller, CORINFO_CLASS_HANDLE hInstanceType);
void recErrorList(const char* error);
void dmpErrorList(DWORD key, DWORD value);
void recGetProfilingHandle(BOOL* pbHookFunction, void** pProfilerHandle, BOOL* pbIndirectedHandles);
void dmpGetProfilingHandle(DWORD key, const Agnostic_GetProfilingHandle& value);
void repGetProfilingHandle(BOOL* pbHookFunction, void** pProfilerHandle, BOOL* pbIndirectedHandles);
void recEmbedFieldHandle(CORINFO_FIELD_HANDLE handle, void** ppIndirection, CORINFO_FIELD_HANDLE result);
void dmpEmbedFieldHandle(DWORDLONG key, DLDL value);
CORINFO_FIELD_HANDLE repEmbedFieldHandle(CORINFO_FIELD_HANDLE handle, void** ppIndirection);
void recAreTypesEquivalent(CORINFO_CLASS_HANDLE cls1, CORINFO_CLASS_HANDLE cls2, BOOL result);
void dmpAreTypesEquivalent(DLDL key, DWORD value);
BOOL repAreTypesEquivalent(CORINFO_CLASS_HANDLE cls1, CORINFO_CLASS_HANDLE cls2);
void recCompareTypesForCast(CORINFO_CLASS_HANDLE fromClass, CORINFO_CLASS_HANDLE toClass, TypeCompareState result);
void dmpCompareTypesForCast(DLDL key, DWORD value);
TypeCompareState repCompareTypesForCast(CORINFO_CLASS_HANDLE fromClass, CORINFO_CLASS_HANDLE toClass);
void recCompareTypesForEquality(CORINFO_CLASS_HANDLE cls1, CORINFO_CLASS_HANDLE cls2, TypeCompareState result);
void dmpCompareTypesForEquality(DLDL key, DWORD value);
TypeCompareState repCompareTypesForEquality(CORINFO_CLASS_HANDLE cls1, CORINFO_CLASS_HANDLE cls2);
void recFindNameOfToken(
CORINFO_MODULE_HANDLE module, mdToken metaTOK, char* szFQName, size_t FQNameCapacity, size_t result);
void dmpFindNameOfToken(DLD key, DLD value);
size_t repFindNameOfToken(CORINFO_MODULE_HANDLE module, mdToken metaTOK, char* szFQName, size_t FQNameCapacity);
void recGetSystemVAmd64PassStructInRegisterDescriptor(
CORINFO_CLASS_HANDLE structHnd,
SYSTEMV_AMD64_CORINFO_STRUCT_REG_PASSING_DESCRIPTOR* structPassInRegDescPtr,
bool result);
void dmpGetSystemVAmd64PassStructInRegisterDescriptor(
DWORDLONG key, const Agnostic_GetSystemVAmd64PassStructInRegisterDescriptor& value);
bool repGetSystemVAmd64PassStructInRegisterDescriptor(
CORINFO_CLASS_HANDLE structHnd, SYSTEMV_AMD64_CORINFO_STRUCT_REG_PASSING_DESCRIPTOR* structPassInRegDescPtr);
void recGetRelocTypeHint(void* target, WORD result);
void dmpGetRelocTypeHint(DWORDLONG key, DWORD value);
WORD repGetRelocTypeHint(void* target);
void recIsWriteBarrierHelperRequired(CORINFO_FIELD_HANDLE field, bool result);
void dmpIsWriteBarrierHelperRequired(DWORDLONG key, DWORD value);
bool repIsWriteBarrierHelperRequired(CORINFO_FIELD_HANDLE field);
void recIsValidToken(CORINFO_MODULE_HANDLE module, unsigned metaTOK, BOOL result);
void dmpIsValidToken(DLD key, DWORD value);
BOOL repIsValidToken(CORINFO_MODULE_HANDLE module, unsigned metaTOK);
void recGetClassName(CORINFO_CLASS_HANDLE cls, const char* result);
void dmpGetClassName(DWORDLONG key, DWORD value);
const char* repGetClassName(CORINFO_CLASS_HANDLE cls);
void recGetClassNameFromMetadata(CORINFO_CLASS_HANDLE cls, char* className, const char** namespaceName);
void dmpGetClassNameFromMetadata(DLD key, DD value);
const char* repGetClassNameFromMetadata(CORINFO_CLASS_HANDLE cls, const char** namespaceName);
void recGetTypeInstantiationArgument(CORINFO_CLASS_HANDLE cls, CORINFO_CLASS_HANDLE result, unsigned index);
void dmpGetTypeInstantiationArgument(DWORDLONG key, DWORDLONG value);
CORINFO_CLASS_HANDLE repGetTypeInstantiationArgument(CORINFO_CLASS_HANDLE cls, unsigned index);
void recAppendClassName(
CORINFO_CLASS_HANDLE cls, BOOL fNamespace, BOOL fFullInst, BOOL fAssembly, const WCHAR* result);
void dmpAppendClassName(const Agnostic_AppendClassName& key, DWORD value);
const WCHAR* repAppendClassName(CORINFO_CLASS_HANDLE cls, BOOL fNamespace, BOOL fFullInst, BOOL fAssembly);
void recGetTailCallCopyArgsThunk(CORINFO_SIG_INFO* pSig, CorInfoHelperTailCallSpecialHandling flags, void* result);
void dmpGetTailCallCopyArgsThunk(const Agnostic_GetTailCallCopyArgsThunk& key, DWORDLONG value);
void* repGetTailCallCopyArgsThunk(CORINFO_SIG_INFO* pSig, CorInfoHelperTailCallSpecialHandling flags);
void recGetMethodDefFromMethod(CORINFO_METHOD_HANDLE hMethod, mdMethodDef result);
void dmpGetMethodDefFromMethod(DWORDLONG key, DWORD value);
mdMethodDef repGetMethodDefFromMethod(CORINFO_METHOD_HANDLE hMethod);
void recCheckMethodModifier(CORINFO_METHOD_HANDLE hMethod, LPCSTR modifier, BOOL fOptional, BOOL result);
void dmpCheckMethodModifier(const Agnostic_CheckMethodModifier& key, DWORD value);
BOOL repCheckMethodModifier(CORINFO_METHOD_HANDLE hMethod, LPCSTR modifier, BOOL fOptional);
void recGetPInvokeUnmanagedTarget(CORINFO_METHOD_HANDLE method, void** ppIndirection, void* result);
void dmpGetPInvokeUnmanagedTarget(DWORDLONG key, DLDL value);
void* repGetPInvokeUnmanagedTarget(CORINFO_METHOD_HANDLE method, void** ppIndirection);
void recGetArrayRank(CORINFO_CLASS_HANDLE cls, unsigned result);
void dmpGetArrayRank(DWORDLONG key, DWORD value);
unsigned repGetArrayRank(CORINFO_CLASS_HANDLE cls);
void recIsFieldStatic(CORINFO_FIELD_HANDLE fhld, bool result);
void dmpIsFieldStatic(DWORDLONG key, DWORD value);
bool repIsFieldStatic(CORINFO_FIELD_HANDLE fhld);
void recGetIntConfigValue(const wchar_t* name, int defaultValue, int result);
void dmpGetIntConfigValue(const Agnostic_ConfigIntInfo& key, int value);
int repGetIntConfigValue(const wchar_t* name, int defaultValue);
void recGetStringConfigValue(const wchar_t* name, const wchar_t* result);
void dmpGetStringConfigValue(DWORD nameIndex, DWORD result);
const wchar_t* repGetStringConfigValue(const wchar_t* name);
struct Environment
{
Environment() : getIntConfigValue(nullptr), getStingConfigValue(nullptr)
{
}
LightWeightMap<MethodContext::Agnostic_ConfigIntInfo, DWORD>* getIntConfigValue;
LightWeightMap<DWORD, DWORD>* getStingConfigValue;
};
Environment cloneEnvironment();
bool WasEnvironmentChanged(const Environment& prevEnv);
CompileResult* cr;
CompileResult* originalCR;
int index;
private:
bool IsEnvironmentHeaderEqual(const Environment& prevEnv);
bool IsEnvironmentContentEqual(const Environment& prevEnv);
template <typename key, typename value>
static bool AreLWMHeadersEqual(LightWeightMap<key, value>* prev, LightWeightMap<key, value>* curr);
static bool IsIntConfigContentEqual(LightWeightMap<Agnostic_ConfigIntInfo, DWORD>* prev,
LightWeightMap<Agnostic_ConfigIntInfo, DWORD>* curr);
static bool IsStringContentEqual(LightWeightMap<DWORD, DWORD>* prev, LightWeightMap<DWORD, DWORD>* curr);
#define LWM(map, key, value) LightWeightMap<key, value>* map;
#define DENSELWM(map, value) DenseLightWeightMap<value>* map;
#include "lwmlist.h"
};
// ********************* Please keep this up-to-date to ease adding more ***************
// Highest packet number: 172
// *************************************************************************************
enum mcPackets
{
Packet_AppendClassName = 149, // Added 8/6/2014 - needed for SIMD
Packet_AreTypesEquivalent = 1,
Packet_AsCorInfoType = 2,
Packet_CanAccessClass = 3,
Packet_CanAccessFamily = 4,
Packet_CanCast = 5,
Retired8 = 6,
Packet_GetLazyStringLiteralHelper = 147, // Added 12/20/2013 - as a replacement for CanEmbedModuleHandleForHelper
Packet_CanGetCookieForPInvokeCalliSig = 7,
Packet_CanGetVarArgsHandle = 8,
Packet_CanInline = 9,
Packet_CanInlineTypeCheckWithObjectVTable = 10,
Packet_CanSkipMethodVerification = 11,
Packet_CanTailCall = 12,
Retired4 = 13,
Packet_CheckMethodModifier = 142, // retired as 13 on 2013/07/04
Retired3 = 14,
Retired5 = 141, // retired as 14 on 2013/07/03
Packet_CompareTypesForCast = 163, // Added 10/4/17
Packet_CompareTypesForEquality = 164, // Added 10/4/17
Packet_CompileMethod = 143, // retired as 141 on 2013/07/09
Packet_ConstructStringLiteral = 15,
Packet_ConvertPInvokeCalliToCall = 169, // Added 4/29/18
Packet_EmbedClassHandle = 16,
Packet_EmbedFieldHandle = 17,
Packet_EmbedGenericHandle = 18,
Packet_EmbedMethodHandle = 19,
Packet_EmbedModuleHandle = 20,
Packet_EmptyStringLiteral = 21,
Retired9 = 136,
Packet_ErrorList = 22,
Packet_FilterException = 134,
Packet_FindCallSiteSig = 23,
Retired7 = 24,
Packet_FindNameOfToken = 145, // Added 7/19/2013 - adjusted members to proper types
Packet_GetSystemVAmd64PassStructInRegisterDescriptor = 156, // Added 2/17/2016
Packet_FindSig = 25,
Packet_GetAddressOfPInvokeFixup = 26,
Packet_GetAddressOfPInvokeTarget = 153, // Added 2/3/2016
Packet_GetAddrOfCaptureThreadGlobal = 27,
Retired1 = 28,
Packet_GetArgClass = 139, // retired as 28 on 2013/07/03
Packet_GetHFAType = 159,
Packet_GetArgNext = 29,
Retired2 = 30,
Packet_GetArgType = 140, // retired as 30 on 2013/07/03
Packet_GetArrayInitializationData = 31,
Packet_GetArrayRank = 32,
Packet_GetBBProfileData = 33,
Packet_GetBoundaries = 34,
Packet_GetBoxHelper = 35,
Packet_GetBuiltinClass = 36,
Packet_GetCallInfo = 37,
Packet_GetCastingHelper = 38,
Packet_GetChildType = 39,
Packet_GetClassAlignmentRequirement = 40,
Packet_GetClassAttribs = 41,
Packet_GetClassDomainID = 42,
Packet_GetClassGClayout = 43,
Packet_GetClassModuleIdForStatics = 44,
Packet_GetClassName = 45,
Packet_GetClassNameFromMetadata = 166, // Added 12/4/17
Packet_GetTypeInstantiationArgument = 167, // Added 12/4/17
Packet_GetClassNumInstanceFields = 46,
Packet_GetClassSize = 47,
Packet_GetHeapClassSize = 170, // Added 10/5/2018
Packet_CanAllocateOnStack = 171, // Added 10/5/2018
Packet_GetIntConfigValue = 151, // Added 2/12/2015
Packet_GetStringConfigValue = 152, // Added 2/12/2015
Packet_GetCookieForPInvokeCalliSig = 48,
Packet_GetDefaultEqualityComparerClass = 162, // Added 9/24/2017
Packet_GetDelegateCtor = 49,
Packet_GetEEInfo = 50,
Packet_GetEHinfo = 51,
Packet_GetFieldAddress = 52,
Packet_GetStaticFieldCurrentClass = 172, // Added 11/7/2018
Packet_GetFieldClass = 53,
Packet_GetFieldInClass = 54,
Packet_GetFieldInfo = 55,
Packet_GetFieldName = 56,
Packet_GetFieldOffset = 57,
Packet_GetFieldThreadLocalStoreID = 58,
Packet_GetFieldType = 59,
Packet_GetFunctionEntryPoint = 60,
Packet_GetFunctionFixedEntryPoint = 61,
Packet_GetGSCookie = 62,
Packet_GetHelperFtn = 63,
Packet_GetHelperName = 64,
Packet_GetInlinedCallFrameVptr = 65,
Packet_GetIntrinsicID = 66,
Packet_GetJitFlags = 154, // Added 2/3/2016
Packet_GetJitTimeLogFilename = 67,
Packet_GetJustMyCodeHandle = 68,
Packet_GetLocationOfThisType = 69,
Packet_GetMethodAttribs = 70,
Packet_GetMethodClass = 71,
Packet_GetMethodDefFromMethod = 72,
Packet_GetMethodHash = 73,
Packet_GetMethodInfo = 74,
Packet_GetMethodName = 75,
Packet_GetMethodNameFromMetadata = 161, // Added 9/6/17
Packet_GetMethodSig = 76,
Packet_GetMethodSync = 77,
Packet_GetMethodVTableOffset = 78,
Packet_GetNewArrHelper = 79,
Packet_GetNewHelper = 80,
Packet_GetParentType = 81,
Packet_GetPInvokeUnmanagedTarget = 82,
Packet_GetProfilingHandle = 83,
Packet_GetRelocTypeHint = 84,
Packet_GetSecurityPrologHelper = 85,
Packet_GetSharedCCtorHelper = 86,
Packet_GetTailCallCopyArgsThunk = 87,
Packet_GetThreadTLSIndex = 88,
Packet_GetTokenTypeAsHandle = 89,
Packet_GetTypeForBox = 90,
Packet_GetTypeForPrimitiveValueClass = 91,
Packet_GetTypeForPrimitiveNumericClass = 168, // Added 12/7/2017
Packet_GetUnboxedEntry = 165, // Added 10/26/17
Packet_GetUnBoxHelper = 92,
Packet_GetReadyToRunHelper = 150, // Added 10/10/2014
Packet_GetReadyToRunDelegateCtorHelper = 157, // Added 3/30/2016
Packet_GetUnmanagedCallConv = 94,
Packet_GetVarArgsHandle = 95,
Packet_GetVars = 96,
Packet_HandleException = 135,
Packet_InitClass = 97,
Packet_InitConstraintsForVerification = 98,
Packet_IsCompatibleDelegate = 99,
Packet_IsDelegateCreationAllowed = 155,
Packet_IsFieldStatic = 137, // Added 4/9/2013 - needed for 4.5.1
Packet_IsInSIMDModule = 148, // Added 6/18/2014 - SIMD support
Packet_IsInstantiationOfVerifiedGeneric = 100,
Packet_IsSDArray = 101,
Packet_IsStructRequiringStackAllocRetBuf = 102,
Packet_IsValidStringRef = 103,
Retired6 = 104,
Packet_IsValidToken = 144, // Added 7/19/2013 - adjusted members to proper types
Packet_IsValueClass = 105,
Packet_IsWriteBarrierHelperRequired = 106,
Packet_MergeClasses = 107,
Packet_PInvokeMarshalingRequired = 108,
Packet_ResolveToken = 109,
Packet_ResolveVirtualMethod = 160, // Added 2/13/17
Packet_TryResolveToken = 158, // Added 4/26/2016
Packet_SatisfiesClassConstraints = 110,
Packet_SatisfiesMethodConstraints = 111,
Packet_ShouldEnforceCallvirtRestriction = 112,
PacketCR_AddressMap = 113,
PacketCR_AllocBBProfileBuffer = 131,
PacketCR_AllocGCInfo = 114,
PacketCR_AllocMem = 115,
PacketCR_AllocUnwindInfo = 132,
PacketCR_AssertLog = 138, // Added 6/10/2013 - added to nicely support ilgen
PacketCR_CallLog = 116,
PacketCR_ClassMustBeLoadedBeforeCodeIsRun = 117,
PacketCR_CompileMethod = 118,
PacketCR_MessageLog = 119,
PacketCR_MethodMustBeLoadedBeforeCodeIsRun = 120,
PacketCR_ProcessName = 121,
PacketCR_RecordRelocation = 122,
PacketCR_ReportFatalError = 123,
PacketCR_ReportInliningDecision = 124,
PacketCR_ReportTailCallDecision = 125,
PacketCR_ReserveUnwindInfo = 133,
PacketCR_SetBoundaries = 126,
PacketCR_SetEHcount = 127,
PacketCR_SetEHinfo = 128,
PacketCR_SetMethodAttribs = 129,
PacketCR_SetVars = 130,
PacketCR_RecordCallSite = 146, // Added 10/28/2013 - to support indirect calls
};
#endif
|