-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Expand file tree
/
Copy pathjitinterface_generated.h
More file actions
1970 lines (1782 loc) · 86.1 KB
/
jitinterface_generated.h
File metadata and controls
1970 lines (1782 loc) · 86.1 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
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// DO NOT EDIT THIS FILE! IT IS AUTOGENERATED
// To regenerate run the gen script in src/coreclr/tools/Common/JitInterface/ThunkGenerator
// and follow the instructions in docs/project/updating-jitinterface.md
#include "corinfoexception.h"
#include "../../../inc/corjit.h"
struct JitInterfaceCallbacks
{
bool (* isIntrinsic)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn);
bool (* notifyMethodInfoUsage)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn);
uint32_t (* getMethodAttribs)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn);
void (* setMethodAttribs)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn, CorInfoMethodRuntimeFlags attribs);
void (* getMethodSig)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn, CORINFO_SIG_INFO* sig, CORINFO_CLASS_HANDLE memberParent);
bool (* getMethodInfo)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn, CORINFO_METHOD_INFO* info, CORINFO_CONTEXT_HANDLE context);
bool (* haveSameMethodDefinition)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE meth1Hnd, CORINFO_METHOD_HANDLE meth2Hnd);
CORINFO_CLASS_HANDLE (* getTypeDefinition)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE type);
CorInfoInline (* canInline)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE callerHnd, CORINFO_METHOD_HANDLE calleeHnd);
void (* beginInlining)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE inlinerHnd, CORINFO_METHOD_HANDLE inlineeHnd);
void (* reportInliningDecision)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE inlinerHnd, CORINFO_METHOD_HANDLE inlineeHnd, CorInfoInline inlineResult, const char* reason);
bool (* canTailCall)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE callerHnd, CORINFO_METHOD_HANDLE declaredCalleeHnd, CORINFO_METHOD_HANDLE exactCalleeHnd, bool fIsTailPrefix);
void (* reportTailCallDecision)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE callerHnd, CORINFO_METHOD_HANDLE calleeHnd, bool fIsTailPrefix, CorInfoTailCall tailCallResult, const char* reason);
void (* getEHinfo)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn, unsigned EHnumber, CORINFO_EH_CLAUSE* clause);
CORINFO_CLASS_HANDLE (* getMethodClass)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE method);
void (* getMethodVTableOffset)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE method, unsigned* offsetOfIndirection, unsigned* offsetAfterIndirection, bool* isRelative);
bool (* resolveVirtualMethod)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_DEVIRTUALIZATION_INFO* info);
CORINFO_METHOD_HANDLE (* getUnboxedEntry)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn, bool* requiresInstMethodTableArg);
CORINFO_METHOD_HANDLE (* getInstantiatedEntry)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn, CORINFO_METHOD_HANDLE* methodArg, CORINFO_CLASS_HANDLE* classArg);
CORINFO_METHOD_HANDLE (* getAsyncOtherVariant)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn, bool* variantIsThunk);
CORINFO_CLASS_HANDLE (* getDefaultComparerClass)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE elemType);
CORINFO_CLASS_HANDLE (* getDefaultEqualityComparerClass)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE elemType);
CORINFO_CLASS_HANDLE (* getSZArrayHelperEnumeratorClass)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE elemType);
void (* expandRawHandleIntrinsic)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_RESOLVED_TOKEN* pResolvedToken, CORINFO_METHOD_HANDLE callerHandle, CORINFO_GENERICHANDLE_RESULT* pResult);
bool (* isIntrinsicType)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE classHnd);
CorInfoCallConvExtension (* getUnmanagedCallConv)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* callSiteSig, bool* pSuppressGCTransition);
bool (* pInvokeMarshalingRequired)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* callSiteSig);
bool (* satisfiesMethodConstraints)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE parent, CORINFO_METHOD_HANDLE method);
void (* methodMustBeLoadedBeforeCodeIsRun)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE method);
void (* getGSCookie)(void * thisHandle, CorInfoExceptionClass** ppException, GSCookie* pCookieVal, GSCookie** ppCookieVal);
void (* setPatchpointInfo)(void * thisHandle, CorInfoExceptionClass** ppException, PatchpointInfo* patchpointInfo);
PatchpointInfo* (* getOSRInfo)(void * thisHandle, CorInfoExceptionClass** ppException, unsigned* ilOffset);
void (* resolveToken)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_RESOLVED_TOKEN* pResolvedToken);
void (* findSig)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_MODULE_HANDLE module, unsigned sigTOK, CORINFO_CONTEXT_HANDLE context, CORINFO_SIG_INFO* sig);
void (* findCallSiteSig)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_MODULE_HANDLE module, unsigned methTOK, CORINFO_CONTEXT_HANDLE context, CORINFO_SIG_INFO* sig);
CORINFO_CLASS_HANDLE (* getTokenTypeAsHandle)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_RESOLVED_TOKEN* pResolvedToken);
int (* getStringLiteral)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_MODULE_HANDLE module, unsigned metaTOK, char16_t* buffer, int bufferSize, int startIndex);
size_t (* printObjectDescription)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_OBJECT_HANDLE handle, char* buffer, size_t bufferSize, size_t* pRequiredBufferSize);
CorInfoType (* asCorInfoType)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls);
const char* (* getClassNameFromMetadata)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls, const char** namespaceName);
CORINFO_CLASS_HANDLE (* getTypeInstantiationArgument)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls, unsigned index);
CORINFO_CLASS_HANDLE (* getMethodInstantiationArgument)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn, unsigned index);
size_t (* printClassName)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls, char* buffer, size_t bufferSize, size_t* pRequiredBufferSize);
bool (* isValueClass)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls);
uint32_t (* getClassAttribs)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls);
const char* (* getClassAssemblyName)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls);
void* (* LongLifetimeMalloc)(void * thisHandle, CorInfoExceptionClass** ppException, size_t sz);
void (* LongLifetimeFree)(void * thisHandle, CorInfoExceptionClass** ppException, void* obj);
bool (* getIsClassInitedFlagAddress)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls, CORINFO_CONST_LOOKUP* addr, int* offset);
void* (* getClassThreadStaticDynamicInfo)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE clr);
void* (* getClassStaticDynamicInfo)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE clr);
bool (* getStaticBaseAddress)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls, bool isGc, CORINFO_CONST_LOOKUP* addr);
unsigned (* getClassSize)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls);
unsigned (* getHeapClassSize)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls);
bool (* canAllocateOnStack)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls);
unsigned (* getClassAlignmentRequirement)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls, bool fDoubleAlignHint);
unsigned (* getClassGClayout)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls, uint8_t* gcPtrs);
unsigned (* getClassNumInstanceFields)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls);
CORINFO_FIELD_HANDLE (* getFieldInClass)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE clsHnd, int32_t num);
GetTypeLayoutResult (* getTypeLayout)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE typeHnd, CORINFO_TYPE_LAYOUT_NODE* treeNodes, size_t* numTreeNodes);
bool (* checkMethodModifier)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE hMethod, const char* modifier, bool fOptional);
CorInfoHelpFunc (* getNewHelper)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE classHandle, bool* pHasSideEffects);
CorInfoHelpFunc (* getNewArrHelper)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE arrayCls);
CorInfoHelpFunc (* getCastingHelper)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_RESOLVED_TOKEN* pResolvedToken, bool fThrowing);
CorInfoHelpFunc (* getSharedCCtorHelper)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE clsHnd);
CORINFO_CLASS_HANDLE (* getTypeForBox)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls);
CorInfoHelpFunc (* getBoxHelper)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls);
CorInfoHelpFunc (* getUnBoxHelper)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls);
CORINFO_OBJECT_HANDLE (* getRuntimeTypePointer)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls);
bool (* isObjectImmutable)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_OBJECT_HANDLE objPtr);
bool (* getStringChar)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_OBJECT_HANDLE strObj, int index, uint16_t* value);
CORINFO_CLASS_HANDLE (* getObjectType)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_OBJECT_HANDLE objPtr);
bool (* getReadyToRunHelper)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_RESOLVED_TOKEN* pResolvedToken, CorInfoHelpFunc id, CORINFO_METHOD_HANDLE callerHandle, CORINFO_CONST_LOOKUP* pLookup);
void (* getReadyToRunDelegateCtorHelper)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_RESOLVED_TOKEN* pTargetMethod, unsigned int targetConstraint, CORINFO_CLASS_HANDLE delegateType, CORINFO_METHOD_HANDLE callerHandle, CORINFO_LOOKUP* pLookup);
CorInfoInitClassResult (* initClass)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_FIELD_HANDLE field, CORINFO_METHOD_HANDLE method, CORINFO_CONTEXT_HANDLE context);
void (* classMustBeLoadedBeforeCodeIsRun)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls);
CORINFO_CLASS_HANDLE (* getBuiltinClass)(void * thisHandle, CorInfoExceptionClass** ppException, CorInfoClassId classId);
CorInfoType (* getTypeForPrimitiveValueClass)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls);
CorInfoType (* getTypeForPrimitiveNumericClass)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls);
bool (* canCast)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE child, CORINFO_CLASS_HANDLE parent);
TypeCompareState (* compareTypesForCast)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE fromClass, CORINFO_CLASS_HANDLE toClass);
TypeCompareState (* compareTypesForEquality)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls1, CORINFO_CLASS_HANDLE cls2);
bool (* isMoreSpecificType)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls1, CORINFO_CLASS_HANDLE cls2);
bool (* isExactType)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls);
TypeCompareState (* isGenericType)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls);
TypeCompareState (* isNullableType)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls);
TypeCompareState (* isEnum)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls, CORINFO_CLASS_HANDLE* underlyingType);
CORINFO_CLASS_HANDLE (* getParentType)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls);
CorInfoType (* getChildType)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE clsHnd, CORINFO_CLASS_HANDLE* clsRet);
bool (* isSDArray)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls);
unsigned (* getArrayRank)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE cls);
CorInfoArrayIntrinsic (* getArrayIntrinsicID)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn);
void* (* getArrayInitializationData)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_FIELD_HANDLE field, uint32_t size);
CorInfoIsAccessAllowedResult (* canAccessClass)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_RESOLVED_TOKEN* pResolvedToken, CORINFO_METHOD_HANDLE callerHandle, CORINFO_HELPER_DESC* pAccessHelper);
size_t (* printFieldName)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_FIELD_HANDLE field, char* buffer, size_t bufferSize, size_t* pRequiredBufferSize);
CORINFO_CLASS_HANDLE (* getFieldClass)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_FIELD_HANDLE field);
CorInfoType (* getFieldType)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_FIELD_HANDLE field, CORINFO_CLASS_HANDLE* structType, CORINFO_CLASS_HANDLE fieldOwnerHint);
unsigned (* getFieldOffset)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_FIELD_HANDLE field);
void (* getFieldInfo)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_RESOLVED_TOKEN* pResolvedToken, CORINFO_METHOD_HANDLE callerHandle, CORINFO_ACCESS_FLAGS flags, CORINFO_FIELD_INFO* pResult);
uint32_t (* getThreadLocalFieldInfo)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_FIELD_HANDLE field, bool isGCtype);
void (* getThreadLocalStaticBlocksInfo)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_THREAD_STATIC_BLOCKS_INFO* pInfo);
void (* getThreadLocalStaticInfo_NativeAOT)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_THREAD_STATIC_INFO_NATIVEAOT* pInfo);
bool (* isFieldStatic)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_FIELD_HANDLE fldHnd);
int (* getArrayOrStringLength)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_OBJECT_HANDLE objHnd);
void (* getBoundaries)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn, unsigned int* cILOffsets, uint32_t** pILOffsets, ICorDebugInfo::BoundaryTypes* implicitBoundaries);
void (* setBoundaries)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn, uint32_t cMap, ICorDebugInfo::OffsetMapping* pMap);
void (* getVars)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn, uint32_t* cVars, ICorDebugInfo::ILVarInfo** vars, bool* extendOthers);
void (* setVars)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn, uint32_t cVars, ICorDebugInfo::NativeVarInfo* vars);
void (* reportRichMappings)(void * thisHandle, CorInfoExceptionClass** ppException, ICorDebugInfo::InlineTreeNode* inlineTreeNodes, uint32_t numInlineTreeNodes, ICorDebugInfo::RichOffsetMapping* mappings, uint32_t numMappings);
void (* reportAsyncDebugInfo)(void * thisHandle, CorInfoExceptionClass** ppException, ICorDebugInfo::AsyncInfo* asyncInfo, ICorDebugInfo::AsyncSuspensionPoint* suspensionPoints, ICorDebugInfo::AsyncContinuationVarInfo* vars, uint32_t numVars);
void (* reportMetadata)(void * thisHandle, CorInfoExceptionClass** ppException, const char* key, const void* value, size_t length);
void* (* allocateArray)(void * thisHandle, CorInfoExceptionClass** ppException, size_t cBytes);
void (* freeArray)(void * thisHandle, CorInfoExceptionClass** ppException, void* array);
CORINFO_ARG_LIST_HANDLE (* getArgNext)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_ARG_LIST_HANDLE args);
CorInfoTypeWithMod (* getArgType)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_SIG_INFO* sig, CORINFO_ARG_LIST_HANDLE args, CORINFO_CLASS_HANDLE* vcTypeRet);
int (* getExactClasses)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE baseType, int maxExactClasses, CORINFO_CLASS_HANDLE* exactClsRet);
CORINFO_CLASS_HANDLE (* getArgClass)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_SIG_INFO* sig, CORINFO_ARG_LIST_HANDLE args);
CorInfoHFAElemType (* getHFAType)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE hClass);
bool (* runWithErrorTrap)(void * thisHandle, CorInfoExceptionClass** ppException, ICorJitInfo::errorTrapFunction function, void* parameter);
bool (* runWithSPMIErrorTrap)(void * thisHandle, CorInfoExceptionClass** ppException, ICorJitInfo::errorTrapFunction function, void* parameter);
void (* getEEInfo)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_EE_INFO* pEEInfoOut);
void (* getAsyncInfo)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_ASYNC_INFO* pAsyncInfoOut);
mdMethodDef (* getMethodDefFromMethod)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE hMethod);
size_t (* printMethodName)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn, char* buffer, size_t bufferSize, size_t* pRequiredBufferSize);
const char* (* getMethodNameFromMetadata)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn, const char** className, const char** namespaceName, const char** enclosingClassNames, size_t maxEnclosingClassNames);
unsigned (* getMethodHash)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn);
bool (* getSystemVAmd64PassStructInRegisterDescriptor)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE structHnd, SYSTEMV_AMD64_CORINFO_STRUCT_REG_PASSING_DESCRIPTOR* structPassInRegDescPtr);
void (* getSwiftLowering)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE structHnd, CORINFO_SWIFT_LOWERING* pLowering);
void (* getFpStructLowering)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE structHnd, CORINFO_FPSTRUCT_LOWERING* pLowering);
CorInfoWasmType (* getWasmLowering)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE structHnd);
uint32_t (* getThreadTLSIndex)(void * thisHandle, CorInfoExceptionClass** ppException, void** ppIndirection);
int32_t* (* getAddrOfCaptureThreadGlobal)(void * thisHandle, CorInfoExceptionClass** ppException, void** ppIndirection);
void (* getHelperFtn)(void * thisHandle, CorInfoExceptionClass** ppException, CorInfoHelpFunc ftnNum, CORINFO_CONST_LOOKUP* pNativeEntrypoint, CORINFO_METHOD_HANDLE* pMethod);
void (* getFunctionEntryPoint)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn, CORINFO_CONST_LOOKUP* pResult, CORINFO_ACCESS_FLAGS accessFlags);
void (* getFunctionFixedEntryPoint)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftn, bool isUnsafeFunctionPointer, CORINFO_CONST_LOOKUP* pResult);
CORINFO_MODULE_HANDLE (* embedModuleHandle)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_MODULE_HANDLE handle, void** ppIndirection);
CORINFO_CLASS_HANDLE (* embedClassHandle)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE handle, void** ppIndirection);
CORINFO_METHOD_HANDLE (* embedMethodHandle)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE handle, void** ppIndirection);
CORINFO_FIELD_HANDLE (* embedFieldHandle)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_FIELD_HANDLE handle, void** ppIndirection);
void (* embedGenericHandle)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_RESOLVED_TOKEN* pResolvedToken, bool fEmbedParent, CORINFO_METHOD_HANDLE callerHandle, CORINFO_GENERICHANDLE_RESULT* pResult);
void (* getLocationOfThisType)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE context, CORINFO_LOOKUP_KIND* pLookupKind);
void (* getAddressOfPInvokeTarget)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE method, CORINFO_CONST_LOOKUP* pLookup);
void* (* GetCookieForPInvokeCalliSig)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_SIG_INFO* szMetaSig, void** ppIndirection);
void* (* GetCookieForInterpreterCalliSig)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_SIG_INFO* szMetaSig);
CORINFO_JUST_MY_CODE_HANDLE (* getJustMyCodeHandle)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE method, CORINFO_JUST_MY_CODE_HANDLE** ppIndirection);
void (* GetProfilingHandle)(void * thisHandle, CorInfoExceptionClass** ppException, bool* pbHookFunction, void** pProfilerHandle, bool* pbIndirectedHandles);
void (* getCallInfo)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_RESOLVED_TOKEN* pResolvedToken, CORINFO_RESOLVED_TOKEN* pConstrainedResolvedToken, CORINFO_METHOD_HANDLE callerHandle, CORINFO_CALLINFO_FLAGS flags, CORINFO_CALL_INFO* pResult);
bool (* getStaticFieldContent)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_FIELD_HANDLE field, uint8_t* buffer, int bufferSize, int valueOffset, bool ignoreMovableObjects);
bool (* getObjectContent)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_OBJECT_HANDLE obj, uint8_t* buffer, int bufferSize, int valueOffset);
CORINFO_CLASS_HANDLE (* getStaticFieldCurrentClass)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_FIELD_HANDLE field, bool* pIsSpeculative);
CORINFO_VARARGS_HANDLE (* getVarArgsHandle)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_SIG_INFO* pSig, CORINFO_METHOD_HANDLE methHnd, void** ppIndirection);
InfoAccessType (* constructStringLiteral)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_MODULE_HANDLE module, unsigned int metaTok, void** ppValue);
InfoAccessType (* emptyStringLiteral)(void * thisHandle, CorInfoExceptionClass** ppException, void** ppValue);
uint32_t (* getFieldThreadLocalStoreID)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_FIELD_HANDLE field, void** ppIndirection);
CORINFO_METHOD_HANDLE (* GetDelegateCtor)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE methHnd, CORINFO_CLASS_HANDLE clsHnd, CORINFO_METHOD_HANDLE targetMethodHnd, DelegateCtorArgs* pCtorData);
void (* MethodCompileComplete)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE methHnd);
bool (* getTailCallHelpers)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_RESOLVED_TOKEN* callToken, CORINFO_SIG_INFO* sig, CORINFO_GET_TAILCALL_HELPERS_FLAGS flags, CORINFO_TAILCALL_HELPERS* pResult);
CORINFO_CLASS_HANDLE (* getContinuationType)(void * thisHandle, CorInfoExceptionClass** ppException, size_t dataSize, bool* objRefs, size_t objRefsSize);
CORINFO_METHOD_HANDLE (* getAsyncResumptionStub)(void * thisHandle, CorInfoExceptionClass** ppException, void** entryPoint);
bool (* convertPInvokeCalliToCall)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_RESOLVED_TOKEN* pResolvedToken, bool mustConvert);
bool (* notifyInstructionSetUsage)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_InstructionSet instructionSet, bool supportEnabled);
void (* updateEntryPointForTailCall)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CONST_LOOKUP* entryPoint);
void (* allocMem)(void * thisHandle, CorInfoExceptionClass** ppException, AllocMemArgs* pArgs);
void (* reserveUnwindInfo)(void * thisHandle, CorInfoExceptionClass** ppException, bool isFunclet, bool isColdCode, uint32_t unwindSize);
void (* allocUnwindInfo)(void * thisHandle, CorInfoExceptionClass** ppException, uint8_t* pHotCode, uint8_t* pColdCode, uint32_t startOffset, uint32_t endOffset, uint32_t unwindSize, uint8_t* pUnwindBlock, CorJitFuncKind funcKind);
void* (* allocGCInfo)(void * thisHandle, CorInfoExceptionClass** ppException, size_t size);
void (* setEHcount)(void * thisHandle, CorInfoExceptionClass** ppException, unsigned cEH);
void (* setEHinfo)(void * thisHandle, CorInfoExceptionClass** ppException, unsigned EHnumber, const CORINFO_EH_CLAUSE* clause);
bool (* logMsg)(void * thisHandle, CorInfoExceptionClass** ppException, unsigned level, const char* fmt, va_list args);
int (* doAssert)(void * thisHandle, CorInfoExceptionClass** ppException, const char* szFile, int iLine, const char* szExpr);
void (* reportFatalError)(void * thisHandle, CorInfoExceptionClass** ppException, CorJitResult result);
JITINTERFACE_HRESULT (* getPgoInstrumentationResults)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftnHnd, ICorJitInfo::PgoInstrumentationSchema** pSchema, uint32_t* pCountSchemaItems, uint8_t** pInstrumentationData, ICorJitInfo::PgoSource* pPgoSource, bool* pDynamicPgo);
JITINTERFACE_HRESULT (* allocPgoInstrumentationBySchema)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_METHOD_HANDLE ftnHnd, ICorJitInfo::PgoInstrumentationSchema* pSchema, uint32_t countSchemaItems, uint8_t** pInstrumentationData);
void (* recordCallSite)(void * thisHandle, CorInfoExceptionClass** ppException, uint32_t instrOffset, CORINFO_SIG_INFO* callSig, CORINFO_METHOD_HANDLE methodHandle);
void (* recordRelocation)(void * thisHandle, CorInfoExceptionClass** ppException, void* location, void* locationRW, void* target, CorInfoReloc fRelocType, int32_t addlDelta);
CorInfoReloc (* getRelocTypeHint)(void * thisHandle, CorInfoExceptionClass** ppException, void* target);
uint32_t (* getExpectedTargetArchitecture)(void * thisHandle, CorInfoExceptionClass** ppException);
uint32_t (* getJitFlags)(void * thisHandle, CorInfoExceptionClass** ppException, CORJIT_FLAGS* flags, uint32_t sizeInBytes);
CORINFO_WASM_TYPE_SYMBOL_HANDLE (* getWasmTypeSymbol)(void * thisHandle, CorInfoExceptionClass** ppException, CorInfoWasmType* types, size_t typesSize);
CORINFO_METHOD_HANDLE (* getSpecialCopyHelper)(void * thisHandle, CorInfoExceptionClass** ppException, CORINFO_CLASS_HANDLE type);
};
class JitInterfaceWrapper : public ICorJitInfo
{
void * _thisHandle;
JitInterfaceCallbacks * _callbacks;
public:
JitInterfaceWrapper(void * thisHandle, void ** callbacks)
: _thisHandle(thisHandle), _callbacks((JitInterfaceCallbacks *)callbacks)
{
}
virtual bool isIntrinsic(
CORINFO_METHOD_HANDLE ftn)
{
CorInfoExceptionClass* pException = nullptr;
bool temp = _callbacks->isIntrinsic(_thisHandle, &pException, ftn);
if (pException != nullptr) throw pException;
return temp;
}
virtual bool notifyMethodInfoUsage(
CORINFO_METHOD_HANDLE ftn)
{
CorInfoExceptionClass* pException = nullptr;
bool temp = _callbacks->notifyMethodInfoUsage(_thisHandle, &pException, ftn);
if (pException != nullptr) throw pException;
return temp;
}
virtual uint32_t getMethodAttribs(
CORINFO_METHOD_HANDLE ftn)
{
CorInfoExceptionClass* pException = nullptr;
uint32_t temp = _callbacks->getMethodAttribs(_thisHandle, &pException, ftn);
if (pException != nullptr) throw pException;
return temp;
}
virtual void setMethodAttribs(
CORINFO_METHOD_HANDLE ftn,
CorInfoMethodRuntimeFlags attribs)
{
CorInfoExceptionClass* pException = nullptr;
_callbacks->setMethodAttribs(_thisHandle, &pException, ftn, attribs);
if (pException != nullptr) throw pException;
}
virtual void getMethodSig(
CORINFO_METHOD_HANDLE ftn,
CORINFO_SIG_INFO* sig,
CORINFO_CLASS_HANDLE memberParent)
{
CorInfoExceptionClass* pException = nullptr;
_callbacks->getMethodSig(_thisHandle, &pException, ftn, sig, memberParent);
if (pException != nullptr) throw pException;
}
virtual bool getMethodInfo(
CORINFO_METHOD_HANDLE ftn,
CORINFO_METHOD_INFO* info,
CORINFO_CONTEXT_HANDLE context)
{
CorInfoExceptionClass* pException = nullptr;
bool temp = _callbacks->getMethodInfo(_thisHandle, &pException, ftn, info, context);
if (pException != nullptr) throw pException;
return temp;
}
virtual bool haveSameMethodDefinition(
CORINFO_METHOD_HANDLE meth1Hnd,
CORINFO_METHOD_HANDLE meth2Hnd)
{
CorInfoExceptionClass* pException = nullptr;
bool temp = _callbacks->haveSameMethodDefinition(_thisHandle, &pException, meth1Hnd, meth2Hnd);
if (pException != nullptr) throw pException;
return temp;
}
virtual CORINFO_CLASS_HANDLE getTypeDefinition(
CORINFO_CLASS_HANDLE type)
{
CorInfoExceptionClass* pException = nullptr;
CORINFO_CLASS_HANDLE temp = _callbacks->getTypeDefinition(_thisHandle, &pException, type);
if (pException != nullptr) throw pException;
return temp;
}
virtual CorInfoInline canInline(
CORINFO_METHOD_HANDLE callerHnd,
CORINFO_METHOD_HANDLE calleeHnd)
{
CorInfoExceptionClass* pException = nullptr;
CorInfoInline temp = _callbacks->canInline(_thisHandle, &pException, callerHnd, calleeHnd);
if (pException != nullptr) throw pException;
return temp;
}
virtual void beginInlining(
CORINFO_METHOD_HANDLE inlinerHnd,
CORINFO_METHOD_HANDLE inlineeHnd)
{
CorInfoExceptionClass* pException = nullptr;
_callbacks->beginInlining(_thisHandle, &pException, inlinerHnd, inlineeHnd);
if (pException != nullptr) throw pException;
}
virtual void reportInliningDecision(
CORINFO_METHOD_HANDLE inlinerHnd,
CORINFO_METHOD_HANDLE inlineeHnd,
CorInfoInline inlineResult,
const char* reason)
{
CorInfoExceptionClass* pException = nullptr;
_callbacks->reportInliningDecision(_thisHandle, &pException, inlinerHnd, inlineeHnd, inlineResult, reason);
if (pException != nullptr) throw pException;
}
virtual bool canTailCall(
CORINFO_METHOD_HANDLE callerHnd,
CORINFO_METHOD_HANDLE declaredCalleeHnd,
CORINFO_METHOD_HANDLE exactCalleeHnd,
bool fIsTailPrefix)
{
CorInfoExceptionClass* pException = nullptr;
bool temp = _callbacks->canTailCall(_thisHandle, &pException, callerHnd, declaredCalleeHnd, exactCalleeHnd, fIsTailPrefix);
if (pException != nullptr) throw pException;
return temp;
}
virtual void reportTailCallDecision(
CORINFO_METHOD_HANDLE callerHnd,
CORINFO_METHOD_HANDLE calleeHnd,
bool fIsTailPrefix,
CorInfoTailCall tailCallResult,
const char* reason)
{
CorInfoExceptionClass* pException = nullptr;
_callbacks->reportTailCallDecision(_thisHandle, &pException, callerHnd, calleeHnd, fIsTailPrefix, tailCallResult, reason);
if (pException != nullptr) throw pException;
}
virtual void getEHinfo(
CORINFO_METHOD_HANDLE ftn,
unsigned EHnumber,
CORINFO_EH_CLAUSE* clause)
{
CorInfoExceptionClass* pException = nullptr;
_callbacks->getEHinfo(_thisHandle, &pException, ftn, EHnumber, clause);
if (pException != nullptr) throw pException;
}
virtual CORINFO_CLASS_HANDLE getMethodClass(
CORINFO_METHOD_HANDLE method)
{
CorInfoExceptionClass* pException = nullptr;
CORINFO_CLASS_HANDLE temp = _callbacks->getMethodClass(_thisHandle, &pException, method);
if (pException != nullptr) throw pException;
return temp;
}
virtual void getMethodVTableOffset(
CORINFO_METHOD_HANDLE method,
unsigned* offsetOfIndirection,
unsigned* offsetAfterIndirection,
bool* isRelative)
{
CorInfoExceptionClass* pException = nullptr;
_callbacks->getMethodVTableOffset(_thisHandle, &pException, method, offsetOfIndirection, offsetAfterIndirection, isRelative);
if (pException != nullptr) throw pException;
}
virtual bool resolveVirtualMethod(
CORINFO_DEVIRTUALIZATION_INFO* info)
{
CorInfoExceptionClass* pException = nullptr;
bool temp = _callbacks->resolveVirtualMethod(_thisHandle, &pException, info);
if (pException != nullptr) throw pException;
return temp;
}
virtual CORINFO_METHOD_HANDLE getUnboxedEntry(
CORINFO_METHOD_HANDLE ftn,
bool* requiresInstMethodTableArg)
{
CorInfoExceptionClass* pException = nullptr;
CORINFO_METHOD_HANDLE temp = _callbacks->getUnboxedEntry(_thisHandle, &pException, ftn, requiresInstMethodTableArg);
if (pException != nullptr) throw pException;
return temp;
}
virtual CORINFO_METHOD_HANDLE getInstantiatedEntry(
CORINFO_METHOD_HANDLE ftn,
CORINFO_METHOD_HANDLE* methodArg,
CORINFO_CLASS_HANDLE* classArg)
{
CorInfoExceptionClass* pException = nullptr;
CORINFO_METHOD_HANDLE temp = _callbacks->getInstantiatedEntry(_thisHandle, &pException, ftn, methodArg, classArg);
if (pException != nullptr) throw pException;
return temp;
}
virtual CORINFO_METHOD_HANDLE getAsyncOtherVariant(
CORINFO_METHOD_HANDLE ftn,
bool* variantIsThunk)
{
CorInfoExceptionClass* pException = nullptr;
CORINFO_METHOD_HANDLE temp = _callbacks->getAsyncOtherVariant(_thisHandle, &pException, ftn, variantIsThunk);
if (pException != nullptr) throw pException;
return temp;
}
virtual CORINFO_CLASS_HANDLE getDefaultComparerClass(
CORINFO_CLASS_HANDLE elemType)
{
CorInfoExceptionClass* pException = nullptr;
CORINFO_CLASS_HANDLE temp = _callbacks->getDefaultComparerClass(_thisHandle, &pException, elemType);
if (pException != nullptr) throw pException;
return temp;
}
virtual CORINFO_CLASS_HANDLE getDefaultEqualityComparerClass(
CORINFO_CLASS_HANDLE elemType)
{
CorInfoExceptionClass* pException = nullptr;
CORINFO_CLASS_HANDLE temp = _callbacks->getDefaultEqualityComparerClass(_thisHandle, &pException, elemType);
if (pException != nullptr) throw pException;
return temp;
}
virtual CORINFO_CLASS_HANDLE getSZArrayHelperEnumeratorClass(
CORINFO_CLASS_HANDLE elemType)
{
CorInfoExceptionClass* pException = nullptr;
CORINFO_CLASS_HANDLE temp = _callbacks->getSZArrayHelperEnumeratorClass(_thisHandle, &pException, elemType);
if (pException != nullptr) throw pException;
return temp;
}
virtual void expandRawHandleIntrinsic(
CORINFO_RESOLVED_TOKEN* pResolvedToken,
CORINFO_METHOD_HANDLE callerHandle,
CORINFO_GENERICHANDLE_RESULT* pResult)
{
CorInfoExceptionClass* pException = nullptr;
_callbacks->expandRawHandleIntrinsic(_thisHandle, &pException, pResolvedToken, callerHandle, pResult);
if (pException != nullptr) throw pException;
}
virtual bool isIntrinsicType(
CORINFO_CLASS_HANDLE classHnd)
{
CorInfoExceptionClass* pException = nullptr;
bool temp = _callbacks->isIntrinsicType(_thisHandle, &pException, classHnd);
if (pException != nullptr) throw pException;
return temp;
}
virtual CorInfoCallConvExtension getUnmanagedCallConv(
CORINFO_METHOD_HANDLE method,
CORINFO_SIG_INFO* callSiteSig,
bool* pSuppressGCTransition)
{
CorInfoExceptionClass* pException = nullptr;
CorInfoCallConvExtension temp = _callbacks->getUnmanagedCallConv(_thisHandle, &pException, method, callSiteSig, pSuppressGCTransition);
if (pException != nullptr) throw pException;
return temp;
}
virtual bool pInvokeMarshalingRequired(
CORINFO_METHOD_HANDLE method,
CORINFO_SIG_INFO* callSiteSig)
{
CorInfoExceptionClass* pException = nullptr;
bool temp = _callbacks->pInvokeMarshalingRequired(_thisHandle, &pException, method, callSiteSig);
if (pException != nullptr) throw pException;
return temp;
}
virtual bool satisfiesMethodConstraints(
CORINFO_CLASS_HANDLE parent,
CORINFO_METHOD_HANDLE method)
{
CorInfoExceptionClass* pException = nullptr;
bool temp = _callbacks->satisfiesMethodConstraints(_thisHandle, &pException, parent, method);
if (pException != nullptr) throw pException;
return temp;
}
virtual void methodMustBeLoadedBeforeCodeIsRun(
CORINFO_METHOD_HANDLE method)
{
CorInfoExceptionClass* pException = nullptr;
_callbacks->methodMustBeLoadedBeforeCodeIsRun(_thisHandle, &pException, method);
if (pException != nullptr) throw pException;
}
virtual void getGSCookie(
GSCookie* pCookieVal,
GSCookie** ppCookieVal)
{
CorInfoExceptionClass* pException = nullptr;
_callbacks->getGSCookie(_thisHandle, &pException, pCookieVal, ppCookieVal);
if (pException != nullptr) throw pException;
}
virtual void setPatchpointInfo(
PatchpointInfo* patchpointInfo)
{
CorInfoExceptionClass* pException = nullptr;
_callbacks->setPatchpointInfo(_thisHandle, &pException, patchpointInfo);
if (pException != nullptr) throw pException;
}
virtual PatchpointInfo* getOSRInfo(
unsigned* ilOffset)
{
CorInfoExceptionClass* pException = nullptr;
PatchpointInfo* temp = _callbacks->getOSRInfo(_thisHandle, &pException, ilOffset);
if (pException != nullptr) throw pException;
return temp;
}
virtual void resolveToken(
CORINFO_RESOLVED_TOKEN* pResolvedToken)
{
CorInfoExceptionClass* pException = nullptr;
_callbacks->resolveToken(_thisHandle, &pException, pResolvedToken);
if (pException != nullptr) throw pException;
}
virtual void findSig(
CORINFO_MODULE_HANDLE module,
unsigned sigTOK,
CORINFO_CONTEXT_HANDLE context,
CORINFO_SIG_INFO* sig)
{
CorInfoExceptionClass* pException = nullptr;
_callbacks->findSig(_thisHandle, &pException, module, sigTOK, context, sig);
if (pException != nullptr) throw pException;
}
virtual void findCallSiteSig(
CORINFO_MODULE_HANDLE module,
unsigned methTOK,
CORINFO_CONTEXT_HANDLE context,
CORINFO_SIG_INFO* sig)
{
CorInfoExceptionClass* pException = nullptr;
_callbacks->findCallSiteSig(_thisHandle, &pException, module, methTOK, context, sig);
if (pException != nullptr) throw pException;
}
virtual CORINFO_CLASS_HANDLE getTokenTypeAsHandle(
CORINFO_RESOLVED_TOKEN* pResolvedToken)
{
CorInfoExceptionClass* pException = nullptr;
CORINFO_CLASS_HANDLE temp = _callbacks->getTokenTypeAsHandle(_thisHandle, &pException, pResolvedToken);
if (pException != nullptr) throw pException;
return temp;
}
virtual int getStringLiteral(
CORINFO_MODULE_HANDLE module,
unsigned metaTOK,
char16_t* buffer,
int bufferSize,
int startIndex)
{
CorInfoExceptionClass* pException = nullptr;
int temp = _callbacks->getStringLiteral(_thisHandle, &pException, module, metaTOK, buffer, bufferSize, startIndex);
if (pException != nullptr) throw pException;
return temp;
}
virtual size_t printObjectDescription(
CORINFO_OBJECT_HANDLE handle,
char* buffer,
size_t bufferSize,
size_t* pRequiredBufferSize)
{
CorInfoExceptionClass* pException = nullptr;
size_t temp = _callbacks->printObjectDescription(_thisHandle, &pException, handle, buffer, bufferSize, pRequiredBufferSize);
if (pException != nullptr) throw pException;
return temp;
}
virtual CorInfoType asCorInfoType(
CORINFO_CLASS_HANDLE cls)
{
CorInfoExceptionClass* pException = nullptr;
CorInfoType temp = _callbacks->asCorInfoType(_thisHandle, &pException, cls);
if (pException != nullptr) throw pException;
return temp;
}
virtual const char* getClassNameFromMetadata(
CORINFO_CLASS_HANDLE cls,
const char** namespaceName)
{
CorInfoExceptionClass* pException = nullptr;
const char* temp = _callbacks->getClassNameFromMetadata(_thisHandle, &pException, cls, namespaceName);
if (pException != nullptr) throw pException;
return temp;
}
virtual CORINFO_CLASS_HANDLE getTypeInstantiationArgument(
CORINFO_CLASS_HANDLE cls,
unsigned index)
{
CorInfoExceptionClass* pException = nullptr;
CORINFO_CLASS_HANDLE temp = _callbacks->getTypeInstantiationArgument(_thisHandle, &pException, cls, index);
if (pException != nullptr) throw pException;
return temp;
}
virtual CORINFO_CLASS_HANDLE getMethodInstantiationArgument(
CORINFO_METHOD_HANDLE ftn,
unsigned index)
{
CorInfoExceptionClass* pException = nullptr;
CORINFO_CLASS_HANDLE temp = _callbacks->getMethodInstantiationArgument(_thisHandle, &pException, ftn, index);
if (pException != nullptr) throw pException;
return temp;
}
virtual size_t printClassName(
CORINFO_CLASS_HANDLE cls,
char* buffer,
size_t bufferSize,
size_t* pRequiredBufferSize)
{
CorInfoExceptionClass* pException = nullptr;
size_t temp = _callbacks->printClassName(_thisHandle, &pException, cls, buffer, bufferSize, pRequiredBufferSize);
if (pException != nullptr) throw pException;
return temp;
}
virtual bool isValueClass(
CORINFO_CLASS_HANDLE cls)
{
CorInfoExceptionClass* pException = nullptr;
bool temp = _callbacks->isValueClass(_thisHandle, &pException, cls);
if (pException != nullptr) throw pException;
return temp;
}
virtual uint32_t getClassAttribs(
CORINFO_CLASS_HANDLE cls)
{
CorInfoExceptionClass* pException = nullptr;
uint32_t temp = _callbacks->getClassAttribs(_thisHandle, &pException, cls);
if (pException != nullptr) throw pException;
return temp;
}
virtual const char* getClassAssemblyName(
CORINFO_CLASS_HANDLE cls)
{
CorInfoExceptionClass* pException = nullptr;
const char* temp = _callbacks->getClassAssemblyName(_thisHandle, &pException, cls);
if (pException != nullptr) throw pException;
return temp;
}
virtual void* LongLifetimeMalloc(
size_t sz)
{
CorInfoExceptionClass* pException = nullptr;
void* temp = _callbacks->LongLifetimeMalloc(_thisHandle, &pException, sz);
if (pException != nullptr) throw pException;
return temp;
}
virtual void LongLifetimeFree(
void* obj)
{
CorInfoExceptionClass* pException = nullptr;
_callbacks->LongLifetimeFree(_thisHandle, &pException, obj);
if (pException != nullptr) throw pException;
}
virtual bool getIsClassInitedFlagAddress(
CORINFO_CLASS_HANDLE cls,
CORINFO_CONST_LOOKUP* addr,
int* offset)
{
CorInfoExceptionClass* pException = nullptr;
bool temp = _callbacks->getIsClassInitedFlagAddress(_thisHandle, &pException, cls, addr, offset);
if (pException != nullptr) throw pException;
return temp;
}
virtual void* getClassThreadStaticDynamicInfo(
CORINFO_CLASS_HANDLE clr)
{
CorInfoExceptionClass* pException = nullptr;
void* temp = _callbacks->getClassThreadStaticDynamicInfo(_thisHandle, &pException, clr);
if (pException != nullptr) throw pException;
return temp;
}
virtual void* getClassStaticDynamicInfo(
CORINFO_CLASS_HANDLE clr)
{
CorInfoExceptionClass* pException = nullptr;
void* temp = _callbacks->getClassStaticDynamicInfo(_thisHandle, &pException, clr);
if (pException != nullptr) throw pException;
return temp;
}
virtual bool getStaticBaseAddress(
CORINFO_CLASS_HANDLE cls,
bool isGc,
CORINFO_CONST_LOOKUP* addr)
{
CorInfoExceptionClass* pException = nullptr;
bool temp = _callbacks->getStaticBaseAddress(_thisHandle, &pException, cls, isGc, addr);
if (pException != nullptr) throw pException;
return temp;
}
virtual unsigned getClassSize(
CORINFO_CLASS_HANDLE cls)
{
CorInfoExceptionClass* pException = nullptr;
unsigned temp = _callbacks->getClassSize(_thisHandle, &pException, cls);
if (pException != nullptr) throw pException;
return temp;
}
virtual unsigned getHeapClassSize(
CORINFO_CLASS_HANDLE cls)
{
CorInfoExceptionClass* pException = nullptr;
unsigned temp = _callbacks->getHeapClassSize(_thisHandle, &pException, cls);
if (pException != nullptr) throw pException;
return temp;
}
virtual bool canAllocateOnStack(
CORINFO_CLASS_HANDLE cls)
{
CorInfoExceptionClass* pException = nullptr;
bool temp = _callbacks->canAllocateOnStack(_thisHandle, &pException, cls);
if (pException != nullptr) throw pException;
return temp;
}
virtual unsigned getClassAlignmentRequirement(
CORINFO_CLASS_HANDLE cls,
bool fDoubleAlignHint)
{
CorInfoExceptionClass* pException = nullptr;
unsigned temp = _callbacks->getClassAlignmentRequirement(_thisHandle, &pException, cls, fDoubleAlignHint);
if (pException != nullptr) throw pException;
return temp;
}
virtual unsigned getClassGClayout(
CORINFO_CLASS_HANDLE cls,
uint8_t* gcPtrs)
{
CorInfoExceptionClass* pException = nullptr;
unsigned temp = _callbacks->getClassGClayout(_thisHandle, &pException, cls, gcPtrs);
if (pException != nullptr) throw pException;
return temp;
}
virtual unsigned getClassNumInstanceFields(
CORINFO_CLASS_HANDLE cls)
{
CorInfoExceptionClass* pException = nullptr;
unsigned temp = _callbacks->getClassNumInstanceFields(_thisHandle, &pException, cls);
if (pException != nullptr) throw pException;
return temp;
}
virtual CORINFO_FIELD_HANDLE getFieldInClass(
CORINFO_CLASS_HANDLE clsHnd,
int32_t num)
{
CorInfoExceptionClass* pException = nullptr;
CORINFO_FIELD_HANDLE temp = _callbacks->getFieldInClass(_thisHandle, &pException, clsHnd, num);
if (pException != nullptr) throw pException;
return temp;
}
virtual GetTypeLayoutResult getTypeLayout(
CORINFO_CLASS_HANDLE typeHnd,
CORINFO_TYPE_LAYOUT_NODE* treeNodes,
size_t* numTreeNodes)
{
CorInfoExceptionClass* pException = nullptr;
GetTypeLayoutResult temp = _callbacks->getTypeLayout(_thisHandle, &pException, typeHnd, treeNodes, numTreeNodes);
if (pException != nullptr) throw pException;
return temp;
}
virtual bool checkMethodModifier(
CORINFO_METHOD_HANDLE hMethod,
const char* modifier,
bool fOptional)
{
CorInfoExceptionClass* pException = nullptr;
bool temp = _callbacks->checkMethodModifier(_thisHandle, &pException, hMethod, modifier, fOptional);
if (pException != nullptr) throw pException;
return temp;
}
virtual CorInfoHelpFunc getNewHelper(
CORINFO_CLASS_HANDLE classHandle,
bool* pHasSideEffects)
{
CorInfoExceptionClass* pException = nullptr;
CorInfoHelpFunc temp = _callbacks->getNewHelper(_thisHandle, &pException, classHandle, pHasSideEffects);
if (pException != nullptr) throw pException;
return temp;
}
virtual CorInfoHelpFunc getNewArrHelper(
CORINFO_CLASS_HANDLE arrayCls)
{
CorInfoExceptionClass* pException = nullptr;
CorInfoHelpFunc temp = _callbacks->getNewArrHelper(_thisHandle, &pException, arrayCls);
if (pException != nullptr) throw pException;
return temp;
}
virtual CorInfoHelpFunc getCastingHelper(
CORINFO_RESOLVED_TOKEN* pResolvedToken,
bool fThrowing)
{
CorInfoExceptionClass* pException = nullptr;
CorInfoHelpFunc temp = _callbacks->getCastingHelper(_thisHandle, &pException, pResolvedToken, fThrowing);
if (pException != nullptr) throw pException;
return temp;
}
virtual CorInfoHelpFunc getSharedCCtorHelper(
CORINFO_CLASS_HANDLE clsHnd)
{
CorInfoExceptionClass* pException = nullptr;
CorInfoHelpFunc temp = _callbacks->getSharedCCtorHelper(_thisHandle, &pException, clsHnd);
if (pException != nullptr) throw pException;
return temp;
}
virtual CORINFO_CLASS_HANDLE getTypeForBox(
CORINFO_CLASS_HANDLE cls)
{
CorInfoExceptionClass* pException = nullptr;
CORINFO_CLASS_HANDLE temp = _callbacks->getTypeForBox(_thisHandle, &pException, cls);
if (pException != nullptr) throw pException;
return temp;
}
virtual CorInfoHelpFunc getBoxHelper(
CORINFO_CLASS_HANDLE cls)
{
CorInfoExceptionClass* pException = nullptr;
CorInfoHelpFunc temp = _callbacks->getBoxHelper(_thisHandle, &pException, cls);
if (pException != nullptr) throw pException;
return temp;
}
virtual CorInfoHelpFunc getUnBoxHelper(
CORINFO_CLASS_HANDLE cls)
{
CorInfoExceptionClass* pException = nullptr;
CorInfoHelpFunc temp = _callbacks->getUnBoxHelper(_thisHandle, &pException, cls);
if (pException != nullptr) throw pException;
return temp;
}
virtual CORINFO_OBJECT_HANDLE getRuntimeTypePointer(
CORINFO_CLASS_HANDLE cls)
{
CorInfoExceptionClass* pException = nullptr;
CORINFO_OBJECT_HANDLE temp = _callbacks->getRuntimeTypePointer(_thisHandle, &pException, cls);
if (pException != nullptr) throw pException;
return temp;
}
virtual bool isObjectImmutable(
CORINFO_OBJECT_HANDLE objPtr)
{
CorInfoExceptionClass* pException = nullptr;
bool temp = _callbacks->isObjectImmutable(_thisHandle, &pException, objPtr);
if (pException != nullptr) throw pException;
return temp;
}
virtual bool getStringChar(
CORINFO_OBJECT_HANDLE strObj,
int index,
uint16_t* value)
{
CorInfoExceptionClass* pException = nullptr;
bool temp = _callbacks->getStringChar(_thisHandle, &pException, strObj, index, value);
if (pException != nullptr) throw pException;
return temp;
}
virtual CORINFO_CLASS_HANDLE getObjectType(
CORINFO_OBJECT_HANDLE objPtr)
{
CorInfoExceptionClass* pException = nullptr;
CORINFO_CLASS_HANDLE temp = _callbacks->getObjectType(_thisHandle, &pException, objPtr);
if (pException != nullptr) throw pException;
return temp;
}
virtual bool getReadyToRunHelper(
CORINFO_RESOLVED_TOKEN* pResolvedToken,
CorInfoHelpFunc id,
CORINFO_METHOD_HANDLE callerHandle,
CORINFO_CONST_LOOKUP* pLookup)
{
CorInfoExceptionClass* pException = nullptr;
bool temp = _callbacks->getReadyToRunHelper(_thisHandle, &pException, pResolvedToken, id, callerHandle, pLookup);
if (pException != nullptr) throw pException;
return temp;
}
virtual void getReadyToRunDelegateCtorHelper(
CORINFO_RESOLVED_TOKEN* pTargetMethod,
unsigned int targetConstraint,
CORINFO_CLASS_HANDLE delegateType,
CORINFO_METHOD_HANDLE callerHandle,
CORINFO_LOOKUP* pLookup)
{
CorInfoExceptionClass* pException = nullptr;
_callbacks->getReadyToRunDelegateCtorHelper(_thisHandle, &pException, pTargetMethod, targetConstraint, delegateType, callerHandle, pLookup);
if (pException != nullptr) throw pException;
}
virtual CorInfoInitClassResult initClass(
CORINFO_FIELD_HANDLE field,
CORINFO_METHOD_HANDLE method,
CORINFO_CONTEXT_HANDLE context)
{
CorInfoExceptionClass* pException = nullptr;
CorInfoInitClassResult temp = _callbacks->initClass(_thisHandle, &pException, field, method, context);
if (pException != nullptr) throw pException;
return temp;
}
virtual void classMustBeLoadedBeforeCodeIsRun(
CORINFO_CLASS_HANDLE cls)
{
CorInfoExceptionClass* pException = nullptr;
_callbacks->classMustBeLoadedBeforeCodeIsRun(_thisHandle, &pException, cls);
if (pException != nullptr) throw pException;
}
virtual CORINFO_CLASS_HANDLE getBuiltinClass(
CorInfoClassId classId)
{
CorInfoExceptionClass* pException = nullptr;
CORINFO_CLASS_HANDLE temp = _callbacks->getBuiltinClass(_thisHandle, &pException, classId);
if (pException != nullptr) throw pException;
return temp;
}
virtual CorInfoType getTypeForPrimitiveValueClass(
CORINFO_CLASS_HANDLE cls)
{
CorInfoExceptionClass* pException = nullptr;
CorInfoType temp = _callbacks->getTypeForPrimitiveValueClass(_thisHandle, &pException, cls);
if (pException != nullptr) throw pException;
return temp;
}
virtual CorInfoType getTypeForPrimitiveNumericClass(
CORINFO_CLASS_HANDLE cls)
{
CorInfoExceptionClass* pException = nullptr;
CorInfoType temp = _callbacks->getTypeForPrimitiveNumericClass(_thisHandle, &pException, cls);
if (pException != nullptr) throw pException;
return temp;
}
virtual bool canCast(
CORINFO_CLASS_HANDLE child,
CORINFO_CLASS_HANDLE parent)
{
CorInfoExceptionClass* pException = nullptr;
bool temp = _callbacks->canCast(_thisHandle, &pException, child, parent);
if (pException != nullptr) throw pException;
return temp;
}
virtual TypeCompareState compareTypesForCast(
CORINFO_CLASS_HANDLE fromClass,
CORINFO_CLASS_HANDLE toClass)
{
CorInfoExceptionClass* pException = nullptr;
TypeCompareState temp = _callbacks->compareTypesForCast(_thisHandle, &pException, fromClass, toClass);
if (pException != nullptr) throw pException;
return temp;
}
virtual TypeCompareState compareTypesForEquality(