forked from dotnet/fsharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenv.fs
More file actions
1454 lines (1322 loc) · 101 KB
/
Copy pathenv.fs
File metadata and controls
1454 lines (1322 loc) · 101 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
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
//-------------------------------------------------------------------------
// Define Initial Environment. A bunch of types and values are hard-wired
// into the compiler. This lets the compiler perform particular optimizations
// for these types and values, for example emitting optimized calls for
// comparison and hashing functions. The compiler generates the compiled code
// for these types and values when the the --compiling-fslib switch is
// provided when linking the FSharp.Core.dll assembly.
//-------------------------------------------------------------------------
module internal Microsoft.FSharp.Compiler.Env
open Internal.Utilities
open Microsoft.FSharp.Compiler
open Microsoft.FSharp.Compiler.AbstractIL
open Microsoft.FSharp.Compiler.AbstractIL.IL
open Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX
open Microsoft.FSharp.Compiler.AbstractIL.Internal
open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library
open Microsoft.FSharp.Compiler.Tast
open Microsoft.FSharp.Compiler.Range
open Microsoft.FSharp.Compiler.Ast
open Microsoft.FSharp.Compiler.ErrorLogger
open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics
open Microsoft.FSharp.Compiler.Lib
open Microsoft.FSharp.Compiler.PrettyNaming
open System.Collections.Generic
let internal DummyFileNameForRangesWithoutASpecificLocation = "startup"
let private envRange = rangeN DummyFileNameForRangesWithoutASpecificLocation 0
let vara = NewRigidTypar "a" envRange
let varb = NewRigidTypar "b" envRange
let private varc = NewRigidTypar "c" envRange
let private vard = NewRigidTypar "d" envRange
let private vare = NewRigidTypar "e" envRange
let private varf = NewRigidTypar "f" envRange
let private varg = NewRigidTypar "g" envRange
let varaTy = mkTyparTy vara
let varbTy = mkTyparTy varb
let private varcTy = mkTyparTy varc
let private vardTy = mkTyparTy vard
let private vareTy = mkTyparTy vare
type public IntrinsicValRef = IntrinsicValRef of NonLocalEntityRef * string * bool * TType * ValLinkageFullKey
let ValRefForIntrinsic (IntrinsicValRef(mvr,_,_,_,key)) = mkNonLocalValRef mvr key
//-------------------------------------------------------------------------
// Access the initial environment: names
//-------------------------------------------------------------------------
[<AutoOpen>]
module FSharpLib =
let CoreOperatorsName = FSharpLib.Root + ".Core.Operators"
let CoreOperatorsCheckedName = FSharpLib.Root + ".Core.Operators.Checked"
let ControlName = FSharpLib.Root + ".Control"
let LinqName = FSharpLib.Root + ".Linq"
let CollectionsName = FSharpLib.Root + ".Collections"
let LanguagePrimitivesName = FSharpLib.Root + ".Core.LanguagePrimitives"
let CompilerServicesName = FSharpLib.Root + ".Core.CompilerServices"
let LinqRuntimeHelpersName = FSharpLib.Root + ".Linq.RuntimeHelpers"
let RuntimeHelpersName = FSharpLib.Root + ".Core.CompilerServices.RuntimeHelpers"
let ExtraTopLevelOperatorsName = FSharpLib.Root + ".Core.ExtraTopLevelOperators"
let HashCompareName = FSharpLib.Root + ".Core.LanguagePrimitives.HashCompare"
let QuotationsName = FSharpLib.Root + ".Quotations"
let OperatorsPath = IL.splitNamespace CoreOperatorsName |> Array.ofList
let OperatorsCheckedPath = IL.splitNamespace CoreOperatorsCheckedName |> Array.ofList
let ControlPath = IL.splitNamespace ControlName
let LinqPath = IL.splitNamespace LinqName
let CollectionsPath = IL.splitNamespace CollectionsName
let LanguagePrimitivesPath = IL.splitNamespace LanguagePrimitivesName |> Array.ofList
let HashComparePath = IL.splitNamespace HashCompareName |> Array.ofList
let CompilerServicesPath = IL.splitNamespace CompilerServicesName |> Array.ofList
let LinqRuntimeHelpersPath = IL.splitNamespace LinqRuntimeHelpersName |> Array.ofList
let RuntimeHelpersPath = IL.splitNamespace RuntimeHelpersName |> Array.ofList
let QuotationsPath = IL.splitNamespace QuotationsName |> Array.ofList
let ExtraTopLevelOperatorsPath = IL.splitNamespace ExtraTopLevelOperatorsName |> Array.ofList
let RootPathArray = FSharpLib.RootPath |> Array.ofList
let CorePathArray = FSharpLib.CorePath |> Array.ofList
let LinqPathArray = LinqPath |> Array.ofList
let ControlPathArray = ControlPath |> Array.ofList
let CollectionsPathArray = CollectionsPath |> Array.ofList
//-------------------------------------------------------------------------
// Access the initial environment: helpers to build references
//-------------------------------------------------------------------------
let private mkNonGenericTy tcref = TType_app(tcref,[])
let mkNonLocalTyconRef2 ccu path n = mkNonLocalTyconRef (mkNonLocalEntityRef ccu path) n
let mk_MFCore_tcref ccu n = mkNonLocalTyconRef2 ccu FSharpLib.CorePathArray n
let mk_MFQuotations_tcref ccu n = mkNonLocalTyconRef2 ccu FSharpLib.QuotationsPath n
let mk_MFLinq_tcref ccu n = mkNonLocalTyconRef2 ccu LinqPathArray n
let mk_MFCollections_tcref ccu n = mkNonLocalTyconRef2 ccu FSharpLib.CollectionsPathArray n
let mk_MFCompilerServices_tcref ccu n = mkNonLocalTyconRef2 ccu FSharpLib.CompilerServicesPath n
let mk_MFRuntimeHelpers_tcref ccu n = mkNonLocalTyconRef2 ccu FSharpLib.RuntimeHelpersPath n
let mk_MFControl_tcref ccu n = mkNonLocalTyconRef2 ccu FSharpLib.ControlPathArray n
type public BuiltinAttribInfo =
| AttribInfo of ILTypeRef * TyconRef
member this.TyconRef = let (AttribInfo(_,tcref)) = this in tcref
member this.TypeRef = let (AttribInfo(tref,_)) = this in tref
//-------------------------------------------------------------------------
// Table of all these "globals"
//-------------------------------------------------------------------------
[<NoEquality; NoComparison>]
type public TcGlobals =
{ ilg : ILGlobals;
#if NO_COMPILER_BACKEND
#else
ilxPubCloEnv : EraseIlxFuncs.cenv;
#endif
emitDebugInfoInQuotations : bool
compilingFslib: bool;
mlCompatibility : bool;
directoryToResolveRelativePaths : string;
fslibCcu: CcuThunk;
sysCcu: CcuThunk;
using40environment: bool;
indirectCallArrayMethods: bool;
better_tcref_map: TyconRef -> TypeInst -> TType option;
refcell_tcr_canon: TyconRef;
option_tcr_canon : TyconRef;
choice2_tcr : TyconRef;
choice3_tcr : TyconRef;
choice4_tcr : TyconRef;
choice5_tcr : TyconRef;
choice6_tcr : TyconRef;
choice7_tcr : TyconRef;
list_tcr_canon : TyconRef;
set_tcr_canon : TyconRef;
map_tcr_canon : TyconRef;
lazy_tcr_canon : TyconRef;
// These have a slightly different behaviour when compiling GetFSharpCoreLibraryName
// hence they are 'methods' on the TcGlobals structure.
unionCaseRefEq : UnionCaseRef -> UnionCaseRef -> bool;
valRefEq : ValRef -> ValRef -> bool;
refcell_tcr_nice: TyconRef;
option_tcr_nice : TyconRef;
list_tcr_nice : TyconRef;
lazy_tcr_nice : TyconRef;
format_tcr : TyconRef;
expr_tcr : TyconRef;
raw_expr_tcr : TyconRef;
nativeint_tcr : TyconRef;
int32_tcr : TyconRef;
int16_tcr : TyconRef;
int64_tcr : TyconRef;
uint16_tcr : TyconRef;
uint32_tcr : TyconRef;
uint64_tcr : TyconRef;
sbyte_tcr : TyconRef;
decimal_tcr : TyconRef;
date_tcr : TyconRef;
pdecimal_tcr : TyconRef;
byte_tcr : TyconRef;
bool_tcr : TyconRef;
unit_tcr_canon : TyconRef;
unit_tcr_nice : TyconRef;
exn_tcr : TyconRef;
char_tcr : TyconRef;
float_tcr : TyconRef;
float32_tcr : TyconRef;
pfloat_tcr : TyconRef;
pfloat32_tcr : TyconRef;
pint_tcr : TyconRef;
pint8_tcr : TyconRef;
pint16_tcr : TyconRef;
pint64_tcr : TyconRef;
byref_tcr : TyconRef;
nativeptr_tcr : TyconRef;
ilsigptr_tcr : TyconRef;
fastFunc_tcr : TyconRef;
array_tcr_nice : TyconRef;
seq_tcr : TyconRef;
seq_base_tcr : TyconRef;
measureproduct_tcr : TyconRef
measureinverse_tcr : TyconRef
measureone_tcr : TyconRef
il_arr_tcr_map : TyconRef[];
tuple1_tcr : TyconRef;
tuple2_tcr : TyconRef;
tuple3_tcr : TyconRef;
tuple4_tcr : TyconRef;
tuple5_tcr : TyconRef;
tuple6_tcr : TyconRef;
tuple7_tcr : TyconRef;
tuple8_tcr : TyconRef;
tcref_IQueryable : TyconRef;
tcref_IObservable : TyconRef;
tcref_IObserver : TyconRef;
fslib_IEvent2_tcr : TyconRef;
fslib_IDelegateEvent_tcr: TyconRef;
system_Nullable_tcref : TyconRef;
system_GenericIComparable_tcref : TyconRef;
system_GenericIEquatable_tcref : TyconRef;
system_IndexOutOfRangeException_tcref : TyconRef;
int_ty : TType;
nativeint_ty : TType;
unativeint_ty : TType;
int32_ty : TType;
int16_ty : TType;
int64_ty : TType;
uint16_ty : TType;
uint32_ty : TType;
uint64_ty : TType;
sbyte_ty : TType;
byte_ty : TType;
bool_ty : TType;
string_ty : TType;
obj_ty : TType;
unit_ty : TType;
exn_ty : TType;
char_ty : TType;
decimal_ty : TType;
float_ty : TType;
float32_ty : TType;
system_Array_typ : TType;
system_Object_typ : TType;
system_IDisposable_typ : TType;
system_Value_typ : TType;
system_Delegate_typ : TType;
system_MulticastDelegate_typ : TType;
system_Enum_typ : TType;
system_Exception_typ : TType;
system_Int32_typ : TType;
system_String_typ : TType;
system_Type_typ : TType;
system_TypedReference_tcref : TyconRef option;
system_ArgIterator_tcref : TyconRef option;
system_Decimal_tcref : TyconRef;
system_SByte_tcref : TyconRef;
system_Int16_tcref : TyconRef;
system_Int32_tcref : TyconRef;
system_Int64_tcref : TyconRef;
system_IntPtr_tcref : TyconRef;
system_Bool_tcref : TyconRef;
system_Char_tcref : TyconRef;
system_Byte_tcref : TyconRef;
system_UInt16_tcref : TyconRef;
system_UInt32_tcref : TyconRef;
system_UInt64_tcref : TyconRef;
system_UIntPtr_tcref : TyconRef;
system_Single_tcref : TyconRef;
system_Double_tcref : TyconRef;
system_RuntimeArgumentHandle_tcref : TyconRef option;
system_RuntimeTypeHandle_typ : TType;
system_RuntimeMethodHandle_typ : TType;
system_MarshalByRefObject_tcref : TyconRef option;
system_MarshalByRefObject_typ : TType option;
system_Reflection_MethodInfo_typ : TType;
system_Array_tcref : TyconRef;
system_Object_tcref : TyconRef;
system_Void_tcref : TyconRef;
system_LinqExpression_tcref : TyconRef;
mk_IComparable_ty : TType;
mk_IStructuralComparable_ty : TType;
mk_IStructuralEquatable_ty : TType;
mk_IComparer_ty : TType;
mk_IEqualityComparer_ty : TType;
tcref_System_Collections_IComparer : TyconRef;
tcref_System_Collections_IEqualityComparer : TyconRef;
tcref_System_Collections_Generic_IEqualityComparer : TyconRef;
tcref_System_Collections_Generic_Dictionary : TyconRef;
tcref_System_IComparable : TyconRef;
tcref_System_IStructuralComparable : TyconRef;
tcref_System_IStructuralEquatable : TyconRef;
tcref_LanguagePrimitives : TyconRef;
attrib_CustomOperationAttribute : BuiltinAttribInfo;
attrib_ProjectionParameterAttribute : BuiltinAttribInfo;
attrib_AttributeUsageAttribute : BuiltinAttribInfo;
attrib_ParamArrayAttribute : BuiltinAttribInfo;
attrib_IDispatchConstantAttribute : BuiltinAttribInfo option;
attrib_IUnknownConstantAttribute : BuiltinAttribInfo option;
attrib_SystemObsolete : BuiltinAttribInfo;
attrib_DllImportAttribute : BuiltinAttribInfo option;
attrib_CompiledNameAttribute : BuiltinAttribInfo;
attrib_NonSerializedAttribute : BuiltinAttribInfo option;
attrib_AutoSerializableAttribute : BuiltinAttribInfo;
attrib_StructLayoutAttribute : BuiltinAttribInfo;
attrib_TypeForwardedToAttribute : BuiltinAttribInfo;
attrib_ComVisibleAttribute : BuiltinAttribInfo;
attrib_ComImportAttribute : BuiltinAttribInfo option;
attrib_FieldOffsetAttribute : BuiltinAttribInfo;
attrib_MarshalAsAttribute : BuiltinAttribInfo option;
attrib_InAttribute : BuiltinAttribInfo option;
attrib_OutAttribute : BuiltinAttribInfo;
attrib_OptionalAttribute : BuiltinAttribInfo option;
attrib_ThreadStaticAttribute : BuiltinAttribInfo option;
attrib_SpecialNameAttribute : BuiltinAttribInfo option;
attrib_VolatileFieldAttribute : BuiltinAttribInfo;
attrib_ContextStaticAttribute : BuiltinAttribInfo option;
attrib_FlagsAttribute : BuiltinAttribInfo;
attrib_DefaultMemberAttribute : BuiltinAttribInfo;
attrib_DebuggerDisplayAttribute : BuiltinAttribInfo;
attrib_DebuggerTypeProxyAttribute : BuiltinAttribInfo;
attrib_PreserveSigAttribute : BuiltinAttribInfo option;
attrib_MethodImplAttribute : BuiltinAttribInfo;
attrib_ExtensionAttribute : BuiltinAttribInfo;
tcref_System_Collections_Generic_IList : TyconRef;
tcref_System_Collections_Generic_IReadOnlyList : TyconRef;
tcref_System_Collections_Generic_ICollection : TyconRef;
tcref_System_Collections_Generic_IReadOnlyCollection : TyconRef;
tcref_System_Collections_Generic_IEnumerable : TyconRef;
tcref_System_Collections_IEnumerable : TyconRef;
tcref_System_Collections_Generic_IEnumerator : TyconRef;
tcref_System_Attribute : TyconRef;
attrib_RequireQualifiedAccessAttribute : BuiltinAttribInfo;
attrib_EntryPointAttribute : BuiltinAttribInfo;
attrib_DefaultAugmentationAttribute : BuiltinAttribInfo;
attrib_CompilerMessageAttribute : BuiltinAttribInfo;
attrib_ExperimentalAttribute : BuiltinAttribInfo;
attrib_UnverifiableAttribute : BuiltinAttribInfo;
attrib_LiteralAttribute : BuiltinAttribInfo;
attrib_ConditionalAttribute : BuiltinAttribInfo;
attrib_OptionalArgumentAttribute : BuiltinAttribInfo;
attrib_RequiresExplicitTypeArgumentsAttribute : BuiltinAttribInfo;
attrib_DefaultValueAttribute : BuiltinAttribInfo;
attrib_ClassAttribute : BuiltinAttribInfo;
attrib_InterfaceAttribute : BuiltinAttribInfo;
attrib_StructAttribute : BuiltinAttribInfo;
attrib_ReflectedDefinitionAttribute : BuiltinAttribInfo;
attrib_AutoOpenAttribute : BuiltinAttribInfo;
attrib_CompilationRepresentationAttribute : BuiltinAttribInfo;
attrib_CompilationArgumentCountsAttribute : BuiltinAttribInfo;
attrib_CompilationMappingAttribute : BuiltinAttribInfo;
attrib_CLIEventAttribute : BuiltinAttribInfo;
attrib_AllowNullLiteralAttribute : BuiltinAttribInfo;
attrib_CLIMutableAttribute : BuiltinAttribInfo;
attrib_NoComparisonAttribute : BuiltinAttribInfo;
attrib_NoEqualityAttribute : BuiltinAttribInfo;
attrib_CustomComparisonAttribute : BuiltinAttribInfo;
attrib_CustomEqualityAttribute : BuiltinAttribInfo;
attrib_EqualityConditionalOnAttribute : BuiltinAttribInfo;
attrib_ComparisonConditionalOnAttribute : BuiltinAttribInfo;
attrib_ReferenceEqualityAttribute : BuiltinAttribInfo;
attrib_StructuralEqualityAttribute : BuiltinAttribInfo;
attrib_StructuralComparisonAttribute : BuiltinAttribInfo;
attrib_SealedAttribute : BuiltinAttribInfo;
attrib_AbstractClassAttribute : BuiltinAttribInfo;
attrib_GeneralizableValueAttribute : BuiltinAttribInfo;
attrib_MeasureAttribute : BuiltinAttribInfo;
attrib_MeasureableAttribute : BuiltinAttribInfo;
attrib_NoDynamicInvocationAttribute : BuiltinAttribInfo;
attrib_SecurityAttribute : BuiltinAttribInfo option;
attrib_SecurityCriticalAttribute : BuiltinAttribInfo;
attrib_SecuritySafeCriticalAttribute : BuiltinAttribInfo;
cons_ucref : UnionCaseRef;
nil_ucref : UnionCaseRef;
(* These are the library values the compiler needs to know about *)
seq_vref : ValRef;
and_vref : ValRef;
and2_vref : ValRef;
addrof_vref : ValRef;
addrof2_vref : ValRef;
or_vref : ValRef;
or2_vref : ValRef;
// 'inner' refers to "after optimization boils away inlined functions"
generic_equality_er_inner_vref : ValRef;
generic_equality_per_inner_vref : ValRef;
generic_equality_withc_inner_vref : ValRef;
generic_comparison_inner_vref : ValRef;
generic_comparison_withc_inner_vref : ValRef;
generic_hash_inner_vref : ValRef;
generic_hash_withc_inner_vref : ValRef;
reference_equality_inner_vref : ValRef;
compare_operator_vref : ValRef;
equals_operator_vref : ValRef;
equals_nullable_operator_vref : ValRef;
nullable_equals_nullable_operator_vref : ValRef;
nullable_equals_operator_vref : ValRef;
not_equals_operator_vref : ValRef;
less_than_operator_vref : ValRef;
less_than_or_equals_operator_vref : ValRef;
greater_than_operator_vref : ValRef;
greater_than_or_equals_operator_vref : ValRef;
bitwise_or_vref : ValRef;
bitwise_and_vref : ValRef;
bitwise_xor_vref : ValRef;
bitwise_unary_not_vref : ValRef;
bitwise_shift_left_vref : ValRef;
bitwise_shift_right_vref : ValRef;
unchecked_addition_vref : ValRef;
unchecked_unary_plus_vref : ValRef;
unchecked_unary_minus_vref : ValRef;
unchecked_unary_not_vref : ValRef;
unchecked_subtraction_vref : ValRef;
unchecked_multiply_vref : ValRef;
unchecked_defaultof_vref : ValRef;
unchecked_subtraction_info : IntrinsicValRef
seq_info : IntrinsicValRef;
reraise_info : IntrinsicValRef;
reraise_vref : ValRef;
typeof_info : IntrinsicValRef;
typeof_vref : ValRef;
methodhandleof_info : IntrinsicValRef;
methodhandleof_vref : ValRef;
sizeof_vref : ValRef;
typedefof_info : IntrinsicValRef;
typedefof_vref : ValRef;
enum_vref : ValRef;
enumOfValue_vref : ValRef
new_decimal_info : IntrinsicValRef;
// 'outer' refers to 'before optimization has boiled away inlined functions'
// Augmentation generation generates calls to these functions
// Optimization generates calls to these functions
generic_comparison_withc_outer_info : IntrinsicValRef;
generic_equality_er_outer_info : IntrinsicValRef;
generic_equality_withc_outer_info : IntrinsicValRef;
generic_hash_withc_outer_info : IntrinsicValRef;
// Augmentation generation and pattern match compilation generates calls to this function
equals_operator_info : IntrinsicValRef;
query_source_vref : ValRef;
query_value_vref : ValRef;
query_run_value_vref : ValRef;
query_run_enumerable_vref : ValRef;
query_for_vref : ValRef;
query_yield_vref : ValRef;
query_yield_from_vref : ValRef;
query_select_vref : ValRef;
query_where_vref : ValRef;
query_zero_vref : ValRef;
query_builder_tcref : TyconRef;
generic_hash_withc_tuple2_vref : ValRef;
generic_hash_withc_tuple3_vref : ValRef;
generic_hash_withc_tuple4_vref : ValRef;
generic_hash_withc_tuple5_vref : ValRef;
generic_equals_withc_tuple2_vref : ValRef;
generic_equals_withc_tuple3_vref : ValRef;
generic_equals_withc_tuple4_vref : ValRef;
generic_equals_withc_tuple5_vref : ValRef;
generic_compare_withc_tuple2_vref : ValRef;
generic_compare_withc_tuple3_vref : ValRef;
generic_compare_withc_tuple4_vref : ValRef;
generic_compare_withc_tuple5_vref : ValRef;
generic_equality_withc_outer_vref : ValRef;
create_instance_info : IntrinsicValRef;
create_event_info : IntrinsicValRef;
unbox_vref : ValRef;
unbox_fast_vref : ValRef;
istype_vref : ValRef;
istype_fast_vref : ValRef;
get_generic_comparer_info : IntrinsicValRef;
get_generic_er_equality_comparer_info : IntrinsicValRef;
get_generic_per_equality_comparer_info : IntrinsicValRef;
unbox_info : IntrinsicValRef;
unbox_fast_info : IntrinsicValRef;
istype_info : IntrinsicValRef;
istype_fast_info : IntrinsicValRef;
dispose_info : IntrinsicValRef;
range_op_vref : ValRef;
range_int32_op_vref : ValRef;
//range_step_op_vref : ValRef;
array_get_vref : ValRef;
array2D_get_vref : ValRef;
array3D_get_vref : ValRef;
array4D_get_vref : ValRef;
seq_collect_vref : ValRef;
seq_collect_info : IntrinsicValRef;
seq_using_info : IntrinsicValRef;
seq_using_vref : ValRef;
seq_delay_info : IntrinsicValRef;
seq_delay_vref : ValRef;
seq_append_info : IntrinsicValRef;
seq_append_vref : ValRef;
seq_generated_info : IntrinsicValRef;
seq_generated_vref : ValRef;
seq_finally_info : IntrinsicValRef;
seq_finally_vref : ValRef;
seq_of_functions_info : IntrinsicValRef;
seq_of_functions_vref : ValRef;
seq_to_array_info : IntrinsicValRef;
seq_to_list_info : IntrinsicValRef;
seq_map_info : IntrinsicValRef;
seq_map_vref : ValRef;
seq_singleton_info : IntrinsicValRef;
seq_singleton_vref : ValRef;
seq_empty_info : IntrinsicValRef;
seq_empty_vref : ValRef;
new_format_info : IntrinsicValRef;
raise_info : IntrinsicValRef;
lazy_force_info : IntrinsicValRef;
lazy_create_info : IntrinsicValRef;
array_get_info : IntrinsicValRef;
array_length_info : IntrinsicValRef;
array2D_get_info : IntrinsicValRef;
array3D_get_info : IntrinsicValRef;
array4D_get_info : IntrinsicValRef;
unpickle_quoted_info : IntrinsicValRef;
cast_quotation_info : IntrinsicValRef;
lift_value_info : IntrinsicValRef;
query_source_as_enum_info : IntrinsicValRef;
new_query_source_info : IntrinsicValRef;
fail_init_info : IntrinsicValRef;
fail_static_init_info : IntrinsicValRef;
check_this_info : IntrinsicValRef;
quote_to_linq_lambda_info : IntrinsicValRef;
sprintf_vref : ValRef;
splice_expr_vref : ValRef;
splice_raw_expr_vref : ValRef;
new_format_vref : ValRef;
mkSysTyconRef : string list -> string -> TyconRef;
// A list of types that are explicitly suppressed from the F# intellisense
// Note that the suppression checks for the precise name of the type
// so the lowercase versions are visible
suppressed_types : TyconRef list;
/// Memoization table to help minimize the number of ILSourceDocument objects we create
memoize_file : int -> IL.ILSourceDocument;
// Are we assuming all code gen is for F# interactive, with no static linking
isInteractive : bool
// A table of all intrinsics that the compiler cares about
knownIntrinsics : IDictionary<(string * string), ValRef>
// A table of known modules in FSharp.Core. Not all modules are necessarily listed, but the more we list the
// better the job we do of mapping from provided expressions back to FSharp.Core F# functions and values.
knownFSharpCoreModules : IDictionary<string, ModuleOrNamespaceRef>
}
override x.ToString() = "<TcGlobals>"
#if DEBUG
// This global is only used during debug output
let global_g = ref (None : TcGlobals option)
#endif
let mkTcGlobals (compilingFslib,sysCcu,ilg,fslibCcu,directoryToResolveRelativePaths,mlCompatibility,
using40environment,indirectCallArrayMethods,isInteractive,getTypeCcu, emitDebugInfoInQuotations) =
let int_tcr = mk_MFCore_tcref fslibCcu "int"
let nativeint_tcr = mk_MFCore_tcref fslibCcu "nativeint"
let unativeint_tcr = mk_MFCore_tcref fslibCcu "unativeint"
let int32_tcr = mk_MFCore_tcref fslibCcu "int32"
let int16_tcr = mk_MFCore_tcref fslibCcu "int16"
let int64_tcr = mk_MFCore_tcref fslibCcu "int64"
let uint16_tcr = mk_MFCore_tcref fslibCcu "uint16"
let uint32_tcr = mk_MFCore_tcref fslibCcu "uint32"
let uint64_tcr = mk_MFCore_tcref fslibCcu "uint64"
let sbyte_tcr = mk_MFCore_tcref fslibCcu "sbyte"
let decimal_tcr = mk_MFCore_tcref fslibCcu "decimal"
let pdecimal_tcr = mk_MFCore_tcref fslibCcu "decimal`1"
let byte_tcr = mk_MFCore_tcref fslibCcu "byte"
let bool_tcr = mk_MFCore_tcref fslibCcu "bool"
let string_tcr = mk_MFCore_tcref fslibCcu "string"
let obj_tcr = mk_MFCore_tcref fslibCcu "obj"
let unit_tcr_canon = mk_MFCore_tcref fslibCcu "Unit"
let unit_tcr_nice = mk_MFCore_tcref fslibCcu "unit"
let exn_tcr = mk_MFCore_tcref fslibCcu "exn"
let char_tcr = mk_MFCore_tcref fslibCcu "char"
let float_tcr = mk_MFCore_tcref fslibCcu "float"
let float32_tcr = mk_MFCore_tcref fslibCcu "float32"
let pfloat_tcr = mk_MFCore_tcref fslibCcu "float`1"
let pfloat32_tcr = mk_MFCore_tcref fslibCcu "float32`1"
let pint_tcr = mk_MFCore_tcref fslibCcu "int`1"
let pint8_tcr = mk_MFCore_tcref fslibCcu "sbyte`1"
let pint16_tcr = mk_MFCore_tcref fslibCcu "int16`1"
let pint64_tcr = mk_MFCore_tcref fslibCcu "int64`1"
let byref_tcr = mk_MFCore_tcref fslibCcu "byref`1"
let nativeptr_tcr = mk_MFCore_tcref fslibCcu "nativeptr`1"
let ilsigptr_tcr = mk_MFCore_tcref fslibCcu "ilsigptr`1"
let fastFunc_tcr = mk_MFCore_tcref fslibCcu "FSharpFunc`2"
let mkSysTyconRef path nm =
let ccu = getTypeCcu path nm
mkNonLocalTyconRef2 ccu (Array.ofList path) nm
let mkSysNonGenericTy path n = mkNonGenericTy(mkSysTyconRef path n)
let sys = ["System"]
let sysLinq = ["System";"Linq"]
let sysCollections = ["System";"Collections"]
let sysGenerics = ["System";"Collections";"Generic"]
let lazy_tcr = mkSysTyconRef sys "Lazy`1"
let fslib_IEvent2_tcr = mk_MFControl_tcref fslibCcu "IEvent`2"
let tcref_IQueryable = mkSysTyconRef sysLinq "IQueryable`1"
let tcref_IObservable = mkSysTyconRef sys "IObservable`1"
let tcref_IObserver = mkSysTyconRef sys "IObserver`1"
let fslib_IDelegateEvent_tcr = mk_MFControl_tcref fslibCcu "IDelegateEvent`1"
let option_tcr_nice = mk_MFCore_tcref fslibCcu "option`1"
let list_tcr_canon = mk_MFCollections_tcref fslibCcu "List`1"
let list_tcr_nice = mk_MFCollections_tcref fslibCcu "list`1"
let lazy_tcr_nice = mk_MFControl_tcref fslibCcu "Lazy`1"
let seq_tcr = mk_MFCollections_tcref fslibCcu "seq`1"
let format_tcr = mk_MFCore_tcref fslibCcu "PrintfFormat`5"
let format4_tcr = mk_MFCore_tcref fslibCcu "PrintfFormat`4"
let date_tcr = mkSysTyconRef sys "DateTime"
let IEnumerable_tcr = mkSysTyconRef sysGenerics "IEnumerable`1"
let IEnumerator_tcr = mkSysTyconRef sysGenerics "IEnumerator`1"
let System_Attribute_tcr = mkSysTyconRef sys "Attribute"
let expr_tcr = mk_MFQuotations_tcref fslibCcu "Expr`1"
let raw_expr_tcr = mk_MFQuotations_tcref fslibCcu "Expr"
let query_builder_tcref = mk_MFLinq_tcref fslibCcu "QueryBuilder"
let querySource_tcr = mk_MFLinq_tcref fslibCcu "QuerySource`2"
let linqExpression_tcr = mkSysTyconRef ["System";"Linq";"Expressions"] "Expression`1"
let il_arr_tcr_map =
Array.init 32 (fun idx ->
let type_sig =
let rank = idx + 1
if rank = 1 then "[]`1"
else "[" + (String.replicate (rank - 1) ",") + "]`1"
mk_MFCore_tcref fslibCcu type_sig)
let bool_ty = mkNonGenericTy bool_tcr
let int_ty = mkNonGenericTy int_tcr
let obj_ty = mkNonGenericTy obj_tcr
let string_ty = mkNonGenericTy string_tcr
let byte_ty = mkNonGenericTy byte_tcr
let decimal_ty = mkSysNonGenericTy sys "Decimal"
let unit_ty = mkNonGenericTy unit_tcr_nice
let system_Type_typ = mkSysNonGenericTy sys "Type"
let system_Reflection_MethodInfo_typ = mkSysNonGenericTy ["System";"Reflection"] "MethodInfo"
let nullable_tcr = mkSysTyconRef sys "Nullable`1"
(* local helpers to build value infos *)
let mkNullableTy ty = TType_app(nullable_tcr, [ty])
let mkByrefTy ty = TType_app(byref_tcr, [ty])
let mkNativePtrType ty = TType_app(nativeptr_tcr, [ty])
let mkFunTy d r = TType_fun (d,r)
let (-->) d r = mkFunTy d r
let mkIteratedFunTy dl r = List.foldBack (-->) dl r
let mkSmallTupledTy l = match l with [] -> unit_ty | [h] -> h | tys -> TType_tuple tys
let tryMkForallTy d r = match d with [] -> r | tps -> TType_forall(tps,r)
let knownIntrinsics = Dictionary<(string*string), ValRef>(HashIdentity.Structural)
let makeIntrinsicValRef (enclosingEntity, logicalName, memberParentName, compiledNameOpt, typars, (argtys,rty)) =
let ty = tryMkForallTy typars (mkIteratedFunTy (List.map mkSmallTupledTy argtys) rty)
let isMember = isSome memberParentName
let argCount = if isMember then List.sum (List.map List.length argtys) else 0
let linkageType = if isMember then Some ty else None
let key = ValLinkageFullKey({ MemberParentMangledName=memberParentName; MemberIsOverride=false; LogicalName=logicalName; TotalArgCount= argCount },linkageType)
let vref = IntrinsicValRef(enclosingEntity,logicalName,isMember,ty,key)
let compiledName = defaultArg compiledNameOpt logicalName
knownIntrinsics.Add((enclosingEntity.LastItemMangledName, compiledName), ValRefForIntrinsic vref)
vref
let mk_IComparer_ty = mkSysNonGenericTy sysCollections "IComparer"
let mk_IEqualityComparer_ty = mkSysNonGenericTy sysCollections "IEqualityComparer"
let system_RuntimeMethodHandle_typ = mkSysNonGenericTy sys "RuntimeMethodHandle"
let mk_unop_ty ty = [[ty]], ty
let mk_binop_ty ty = [[ty]; [ty]], ty
let mk_shiftop_ty ty = [[ty]; [int_ty]], ty
let mk_binop_ty3 ty1 ty2 ty3 = [[ty1]; [ty2]], ty3
let mk_rel_sig ty = [[ty];[ty]],bool_ty
let mk_compare_sig ty = [[ty];[ty]],int_ty
let mk_hash_sig ty = [[ty]], int_ty
let mk_compare_withc_sig ty = [[mk_IComparer_ty];[ty]; [ty]], int_ty
let mk_equality_withc_sig ty = [[mk_IEqualityComparer_ty];[ty];[ty]], bool_ty
let mk_hash_withc_sig ty = [[mk_IEqualityComparer_ty]; [ty]], int_ty
let mkListTy ty = TType_app(list_tcr_nice,[ty])
let mkSeqTy ty1 = TType_app(seq_tcr,[ty1])
let mkQuerySourceTy ty1 ty2 = TType_app(querySource_tcr,[ty1; ty2])
let tcref_System_Collections_IEnumerable = mkSysTyconRef sysCollections "IEnumerable";
let mkArrayType rank (ty : TType) : TType =
assert (rank >= 1 && rank <= 32)
TType_app(il_arr_tcr_map.[rank - 1], [ty])
let mkLazyTy ty = TType_app(lazy_tcr, [ty])
let mkPrintfFormatTy aty bty cty dty ety = TType_app(format_tcr, [aty;bty;cty;dty; ety])
let mk_format4_ty aty bty cty dty = TType_app(format4_tcr, [aty;bty;cty;dty])
let mkQuotedExprTy aty = TType_app(expr_tcr, [aty])
let mkRawQuotedExprTy = TType_app(raw_expr_tcr, [])
let mkQueryBuilderTy = TType_app(query_builder_tcref, [])
let mkLinqExpressionTy aty = TType_app(linqExpression_tcr, [aty])
let cons_ucref = mkUnionCaseRef list_tcr_canon "op_ColonColon"
let nil_ucref = mkUnionCaseRef list_tcr_canon "op_Nil"
let fslib_MF_nleref = mkNonLocalEntityRef fslibCcu FSharpLib.RootPathArray
let fslib_MFCore_nleref = mkNonLocalEntityRef fslibCcu FSharpLib.CorePathArray
let fslib_MFLinq_nleref = mkNonLocalEntityRef fslibCcu FSharpLib.LinqPathArray
let fslib_MFCollections_nleref = mkNonLocalEntityRef fslibCcu FSharpLib.CollectionsPathArray
let fslib_MFCompilerServices_nleref = mkNonLocalEntityRef fslibCcu FSharpLib.CompilerServicesPath
let fslib_MFLinqRuntimeHelpers_nleref = mkNonLocalEntityRef fslibCcu FSharpLib.LinqRuntimeHelpersPath
let fslib_MFControl_nleref = mkNonLocalEntityRef fslibCcu FSharpLib.ControlPathArray
let fslib_MFLanguagePrimitives_nleref = mkNestedNonLocalEntityRef fslib_MFCore_nleref "LanguagePrimitives"
let fslib_MFIntrinsicOperators_nleref = mkNestedNonLocalEntityRef fslib_MFLanguagePrimitives_nleref "IntrinsicOperators"
let fslib_MFIntrinsicFunctions_nleref = mkNestedNonLocalEntityRef fslib_MFLanguagePrimitives_nleref "IntrinsicFunctions"
let fslib_MFHashCompare_nleref = mkNestedNonLocalEntityRef fslib_MFLanguagePrimitives_nleref "HashCompare"
let fslib_MFOperators_nleref = mkNestedNonLocalEntityRef fslib_MFCore_nleref "Operators"
let fslib_MFOperatorIntrinsics_nleref = mkNestedNonLocalEntityRef fslib_MFOperators_nleref "OperatorIntrinsics"
let fslib_MFOperatorsUnchecked_nleref = mkNestedNonLocalEntityRef fslib_MFOperators_nleref "Unchecked"
let fslib_MFOperatorsChecked_nleref = mkNestedNonLocalEntityRef fslib_MFOperators_nleref "Checked"
let fslib_MFExtraTopLevelOperators_nleref = mkNestedNonLocalEntityRef fslib_MFCore_nleref "ExtraTopLevelOperators"
let fslib_MFNullableOperators_nleref = mkNestedNonLocalEntityRef fslib_MFLinq_nleref "NullableOperators"
let fslib_MFQueryRunExtensions_nleref = mkNestedNonLocalEntityRef fslib_MFLinq_nleref "QueryRunExtensions"
let fslib_MFQueryRunExtensionsLowPriority_nleref = mkNestedNonLocalEntityRef fslib_MFQueryRunExtensions_nleref "LowPriority"
let fslib_MFQueryRunExtensionsHighPriority_nleref = mkNestedNonLocalEntityRef fslib_MFQueryRunExtensions_nleref "HighPriority"
let fslib_MFSeqModule_nleref = mkNestedNonLocalEntityRef fslib_MFCollections_nleref "SeqModule"
let fslib_MFListModule_nleref = mkNestedNonLocalEntityRef fslib_MFCollections_nleref "ListModule"
let fslib_MFArrayModule_nleref = mkNestedNonLocalEntityRef fslib_MFCollections_nleref "ArrayModule"
let fslib_MFArray2DModule_nleref = mkNestedNonLocalEntityRef fslib_MFCollections_nleref "Array2DModule"
let fslib_MFArray3DModule_nleref = mkNestedNonLocalEntityRef fslib_MFCollections_nleref "Array3DModule"
let fslib_MFArray4DModule_nleref = mkNestedNonLocalEntityRef fslib_MFCollections_nleref "Array4DModule"
let fslib_MFSetModule_nleref = mkNestedNonLocalEntityRef fslib_MFCollections_nleref "SetModule"
let fslib_MFMapModule_nleref = mkNestedNonLocalEntityRef fslib_MFCollections_nleref "MapModule"
let fslib_MFStringModule_nleref = mkNestedNonLocalEntityRef fslib_MFCollections_nleref "StringModule"
let fslib_MFOptionModule_nleref = mkNestedNonLocalEntityRef fslib_MFCore_nleref "OptionModule"
let fslib_MFRuntimeHelpers_nleref = mkNestedNonLocalEntityRef fslib_MFCompilerServices_nleref "RuntimeHelpers"
let fslib_MFQuotations_nleref = mkNestedNonLocalEntityRef fslib_MF_nleref "Quotations"
let fslib_MFLinqRuntimeHelpersQuotationConverter_nleref = mkNestedNonLocalEntityRef fslib_MFLinqRuntimeHelpers_nleref "LeafExpressionConverter"
let fslib_MFLazyExtensions_nleref = mkNestedNonLocalEntityRef fslib_MFControl_nleref "LazyExtensions"
let tuple1_tcr = mkSysTyconRef sys "Tuple`1"
let tuple2_tcr = mkSysTyconRef sys "Tuple`2"
let tuple3_tcr = mkSysTyconRef sys "Tuple`3"
let tuple4_tcr = mkSysTyconRef sys "Tuple`4"
let tuple5_tcr = mkSysTyconRef sys "Tuple`5"
let tuple6_tcr = mkSysTyconRef sys "Tuple`6"
let tuple7_tcr = mkSysTyconRef sys "Tuple`7"
let tuple8_tcr = mkSysTyconRef sys "Tuple`8"
let choice2_tcr = mk_MFCore_tcref fslibCcu "Choice`2"
let choice3_tcr = mk_MFCore_tcref fslibCcu "Choice`3"
let choice4_tcr = mk_MFCore_tcref fslibCcu "Choice`4"
let choice5_tcr = mk_MFCore_tcref fslibCcu "Choice`5"
let choice6_tcr = mk_MFCore_tcref fslibCcu "Choice`6"
let choice7_tcr = mk_MFCore_tcref fslibCcu "Choice`7"
let tyconRefEq x y = primEntityRefEq compilingFslib fslibCcu x y
let valRefEq x y = primValRefEq compilingFslib fslibCcu x y
let unionCaseRefEq x y = primUnionCaseRefEq compilingFslib fslibCcu x y
let suppressed_types =
[ mk_MFCore_tcref fslibCcu "Option`1";
mk_MFCore_tcref fslibCcu "Ref`1";
mk_MFCore_tcref fslibCcu "FSharpTypeFunc";
mk_MFCore_tcref fslibCcu "FSharpFunc`2";
mk_MFCore_tcref fslibCcu "Unit" ]
let knownFSharpCoreModules =
dict [ for nleref in [ fslib_MFLanguagePrimitives_nleref
fslib_MFIntrinsicOperators_nleref
fslib_MFIntrinsicFunctions_nleref
fslib_MFHashCompare_nleref
fslib_MFOperators_nleref
fslib_MFOperatorIntrinsics_nleref
fslib_MFOperatorsUnchecked_nleref
fslib_MFOperatorsChecked_nleref
fslib_MFExtraTopLevelOperators_nleref
fslib_MFNullableOperators_nleref
fslib_MFQueryRunExtensions_nleref
fslib_MFQueryRunExtensionsLowPriority_nleref
fslib_MFQueryRunExtensionsHighPriority_nleref
fslib_MFSeqModule_nleref
fslib_MFListModule_nleref
fslib_MFArrayModule_nleref
fslib_MFArray2DModule_nleref
fslib_MFArray3DModule_nleref
fslib_MFArray4DModule_nleref
fslib_MFSetModule_nleref
fslib_MFMapModule_nleref
fslib_MFStringModule_nleref
fslib_MFOptionModule_nleref
fslib_MFRuntimeHelpers_nleref ] do
yield nleref.LastItemMangledName, ERefNonLocal nleref ]
let decodeTupleTy l =
match l with
| [t1;t2;t3;t4;t5;t6;t7;marker] ->
match marker with
| TType_app(tcref,[t8]) when tyconRefEq tcref tuple1_tcr -> TType_tuple [t1;t2;t3;t4;t5;t6;t7;t8]
| TType_tuple t8plus -> TType_tuple ([t1;t2;t3;t4;t5;t6;t7] @ t8plus)
| _ -> TType_tuple l
| _ -> TType_tuple l
let mk_MFCore_attrib nm : BuiltinAttribInfo =
AttribInfo(mkILTyRef(IlxSettings.ilxFsharpCoreLibScopeRef (), nm),mk_MFCore_tcref fslibCcu nm)
let mkAttrib (nm:string) scopeRef : BuiltinAttribInfo =
let path, typeName = splitILTypeName nm
AttribInfo(mkILTyRef (scopeRef, nm), mkSysTyconRef path typeName)
let mkSystemRuntimeAttrib (nm:string) : BuiltinAttribInfo = mkAttrib nm ilg.traits.ScopeRef
let mkSystemRuntimeInteropServicesAttribute nm =
match ilg.traits.SystemRuntimeInteropServicesScopeRef.Value with
| Some assemblyRef -> Some (mkAttrib nm assemblyRef)
| None -> None
let mkSystemDiagnosticsDebugAttribute nm = mkAttrib nm (ilg.traits.SystemDiagnosticsDebugScopeRef.Value)
let mk_doc filename = ILSourceDocument.Create(language=None, vendor=None, documentType=None, file=filename)
// Build the memoization table for files
let memoize_file = new MemoizationTable<int,ILSourceDocument> ((fileOfFileIndex >> Filename.fullpath directoryToResolveRelativePaths >> mk_doc), keyComparer=HashIdentity.Structural)
let and_info = makeIntrinsicValRef(fslib_MFIntrinsicOperators_nleref, CompileOpName "&" ,None ,None ,[], mk_rel_sig bool_ty)
let addrof_info = makeIntrinsicValRef(fslib_MFIntrinsicOperators_nleref, CompileOpName "~&" ,None ,None ,[vara], ([[varaTy]], mkByrefTy varaTy))
let addrof2_info = makeIntrinsicValRef(fslib_MFIntrinsicOperators_nleref, CompileOpName "~&&" ,None ,None ,[vara], ([[varaTy]], mkNativePtrType varaTy))
let and2_info = makeIntrinsicValRef(fslib_MFIntrinsicOperators_nleref, CompileOpName "&&" ,None ,None ,[], mk_rel_sig bool_ty)
let or_info = makeIntrinsicValRef(fslib_MFIntrinsicOperators_nleref, "or" ,None ,Some "Or" ,[], mk_rel_sig bool_ty)
let or2_info = makeIntrinsicValRef(fslib_MFIntrinsicOperators_nleref, CompileOpName "||" ,None ,None ,[], mk_rel_sig bool_ty)
let compare_operator_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "compare" ,None ,Some "Compare",[vara], mk_compare_sig varaTy)
let equals_operator_info = makeIntrinsicValRef(fslib_MFOperators_nleref, CompileOpName "=" ,None ,None ,[vara], mk_rel_sig varaTy)
let equals_nullable_operator_info = makeIntrinsicValRef(fslib_MFNullableOperators_nleref, CompileOpName "=?" ,None ,None ,[vara], ([[varaTy];[mkNullableTy varaTy]],bool_ty))
let nullable_equals_operator_info = makeIntrinsicValRef(fslib_MFNullableOperators_nleref, CompileOpName "?=" ,None ,None ,[vara], ([[mkNullableTy varaTy];[varaTy]],bool_ty))
let nullable_equals_nullable_operator_info = makeIntrinsicValRef(fslib_MFNullableOperators_nleref, CompileOpName "?=?" ,None ,None ,[vara], ([[mkNullableTy varaTy];[mkNullableTy varaTy]],bool_ty))
let not_equals_operator_info = makeIntrinsicValRef(fslib_MFOperators_nleref, CompileOpName "<>" ,None ,None ,[vara], mk_rel_sig varaTy)
let less_than_operator_info = makeIntrinsicValRef(fslib_MFOperators_nleref, CompileOpName "<" ,None ,None ,[vara], mk_rel_sig varaTy)
let less_than_or_equals_operator_info = makeIntrinsicValRef(fslib_MFOperators_nleref, CompileOpName "<=" ,None ,None ,[vara], mk_rel_sig varaTy)
let greater_than_operator_info = makeIntrinsicValRef(fslib_MFOperators_nleref, CompileOpName ">" ,None ,None ,[vara], mk_rel_sig varaTy)
let greater_than_or_equals_operator_info = makeIntrinsicValRef(fslib_MFOperators_nleref, CompileOpName ">=" ,None ,None ,[vara], mk_rel_sig varaTy)
let enumOfValue_info = makeIntrinsicValRef(fslib_MFLanguagePrimitives_nleref, "EnumOfValue" ,None ,None ,[vara; varb], ([[varaTy]], varbTy))
let generic_comparison_withc_outer_info = makeIntrinsicValRef(fslib_MFLanguagePrimitives_nleref, "GenericComparisonWithComparer" ,None ,None ,[vara], mk_compare_withc_sig varaTy)
let generic_hash_withc_tuple2_info = makeIntrinsicValRef(fslib_MFHashCompare_nleref, "FastHashTuple2" ,None ,None ,[vara;varb], mk_hash_withc_sig (decodeTupleTy [varaTy; varbTy]))
let generic_hash_withc_tuple3_info = makeIntrinsicValRef(fslib_MFHashCompare_nleref, "FastHashTuple3" ,None ,None ,[vara;varb;varc], mk_hash_withc_sig (decodeTupleTy [varaTy; varbTy; varcTy]))
let generic_hash_withc_tuple4_info = makeIntrinsicValRef(fslib_MFHashCompare_nleref, "FastHashTuple4" ,None ,None ,[vara;varb;varc;vard], mk_hash_withc_sig (decodeTupleTy [varaTy; varbTy; varcTy; vardTy]))
let generic_hash_withc_tuple5_info = makeIntrinsicValRef(fslib_MFHashCompare_nleref, "FastHashTuple5" ,None ,None ,[vara;varb;varc;vard;vare],mk_hash_withc_sig (decodeTupleTy [varaTy; varbTy; varcTy; vardTy; vareTy]))
let generic_equals_withc_tuple2_info = makeIntrinsicValRef(fslib_MFHashCompare_nleref, "FastEqualsTuple2" ,None ,None ,[vara;varb], mk_equality_withc_sig (decodeTupleTy [varaTy; varbTy]))
let generic_equals_withc_tuple3_info = makeIntrinsicValRef(fslib_MFHashCompare_nleref, "FastEqualsTuple3" ,None ,None ,[vara;varb;varc], mk_equality_withc_sig (decodeTupleTy [varaTy; varbTy; varcTy]))
let generic_equals_withc_tuple4_info = makeIntrinsicValRef(fslib_MFHashCompare_nleref, "FastEqualsTuple4" ,None ,None ,[vara;varb;varc;vard], mk_equality_withc_sig (decodeTupleTy [varaTy; varbTy; varcTy; vardTy]))
let generic_equals_withc_tuple5_info = makeIntrinsicValRef(fslib_MFHashCompare_nleref, "FastEqualsTuple5" ,None ,None ,[vara;varb;varc;vard;vare],mk_equality_withc_sig (decodeTupleTy [varaTy; varbTy; varcTy; vardTy; vareTy]))
let generic_compare_withc_tuple2_info = makeIntrinsicValRef(fslib_MFHashCompare_nleref, "FastCompareTuple2" ,None ,None ,[vara;varb], mk_compare_withc_sig (decodeTupleTy [varaTy; varbTy]))
let generic_compare_withc_tuple3_info = makeIntrinsicValRef(fslib_MFHashCompare_nleref, "FastCompareTuple3" ,None ,None ,[vara;varb;varc], mk_compare_withc_sig (decodeTupleTy [varaTy; varbTy; varcTy]))
let generic_compare_withc_tuple4_info = makeIntrinsicValRef(fslib_MFHashCompare_nleref, "FastCompareTuple4" ,None ,None ,[vara;varb;varc;vard], mk_compare_withc_sig (decodeTupleTy [varaTy; varbTy; varcTy; vardTy]))
let generic_compare_withc_tuple5_info = makeIntrinsicValRef(fslib_MFHashCompare_nleref, "FastCompareTuple5" ,None ,None ,[vara;varb;varc;vard;vare],mk_compare_withc_sig (decodeTupleTy [varaTy; varbTy; varcTy; vardTy; vareTy]))
let generic_equality_er_outer_info = makeIntrinsicValRef(fslib_MFLanguagePrimitives_nleref, "GenericEqualityER" ,None ,None ,[vara], mk_rel_sig varaTy)
let get_generic_comparer_info = makeIntrinsicValRef(fslib_MFLanguagePrimitives_nleref, "GenericComparer" ,None ,None ,[], ([], mk_IComparer_ty))
let get_generic_er_equality_comparer_info = makeIntrinsicValRef(fslib_MFLanguagePrimitives_nleref, "GenericEqualityERComparer" ,None ,None ,[], ([], mk_IEqualityComparer_ty))
let get_generic_per_equality_comparer_info = makeIntrinsicValRef(fslib_MFLanguagePrimitives_nleref, "GenericEqualityComparer" ,None ,None ,[], ([], mk_IEqualityComparer_ty))
let generic_equality_withc_outer_info = makeIntrinsicValRef(fslib_MFLanguagePrimitives_nleref, "GenericEqualityWithComparer" ,None ,None ,[vara], mk_equality_withc_sig varaTy)
let generic_hash_withc_outer_info = makeIntrinsicValRef(fslib_MFLanguagePrimitives_nleref, "GenericHashWithComparer" ,None ,None ,[vara], mk_hash_withc_sig varaTy)
let generic_equality_er_inner_info = makeIntrinsicValRef(fslib_MFHashCompare_nleref, "GenericEqualityERIntrinsic" ,None ,None ,[vara], mk_rel_sig varaTy)
let generic_equality_per_inner_info = makeIntrinsicValRef(fslib_MFHashCompare_nleref, "GenericEqualityIntrinsic" ,None ,None ,[vara], mk_rel_sig varaTy)
let generic_equality_withc_inner_info = makeIntrinsicValRef(fslib_MFHashCompare_nleref, "GenericEqualityWithComparerIntrinsic" ,None ,None ,[vara], mk_equality_withc_sig varaTy)
let generic_comparison_inner_info = makeIntrinsicValRef(fslib_MFHashCompare_nleref, "GenericComparisonIntrinsic" ,None ,None ,[vara], mk_compare_sig varaTy)
let generic_comparison_withc_inner_info = makeIntrinsicValRef(fslib_MFHashCompare_nleref, "GenericComparisonWithComparerIntrinsic",None ,None ,[vara], mk_compare_withc_sig varaTy)
let generic_hash_inner_info = makeIntrinsicValRef(fslib_MFHashCompare_nleref, "GenericHashIntrinsic" ,None ,None ,[vara], mk_hash_sig varaTy)
let generic_hash_withc_inner_info = makeIntrinsicValRef(fslib_MFHashCompare_nleref, "GenericHashWithComparerIntrinsic" ,None ,None ,[vara], mk_hash_withc_sig varaTy)
let create_instance_info = makeIntrinsicValRef(fslib_MFIntrinsicFunctions_nleref, "CreateInstance" ,None ,None ,[vara], ([[unit_ty]], varaTy))
let unbox_info = makeIntrinsicValRef(fslib_MFIntrinsicFunctions_nleref, "UnboxGeneric" ,None ,None ,[vara], ([[obj_ty]], varaTy))
let unbox_fast_info = makeIntrinsicValRef(fslib_MFIntrinsicFunctions_nleref, "UnboxFast" ,None ,None ,[vara], ([[obj_ty]], varaTy))
let istype_info = makeIntrinsicValRef(fslib_MFIntrinsicFunctions_nleref, "TypeTestGeneric" ,None ,None ,[vara], ([[obj_ty]], bool_ty))
let istype_fast_info = makeIntrinsicValRef(fslib_MFIntrinsicFunctions_nleref, "TypeTestFast" ,None ,None ,[vara], ([[obj_ty]], bool_ty))
let dispose_info = makeIntrinsicValRef(fslib_MFIntrinsicFunctions_nleref, "Dispose" ,None ,None ,[vara], ([[varaTy]],unit_ty))
let reference_equality_inner_info = makeIntrinsicValRef(fslib_MFHashCompare_nleref, "PhysicalEqualityIntrinsic" ,None ,None ,[vara], mk_rel_sig varaTy)
let bitwise_or_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "op_BitwiseOr" ,None ,None ,[vara], mk_binop_ty varaTy)
let bitwise_and_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "op_BitwiseAnd" ,None ,None ,[vara], mk_binop_ty varaTy)
let bitwise_xor_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "op_ExclusiveOr" ,None ,None ,[vara], mk_binop_ty varaTy)
let bitwise_unary_not_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "op_LogicalNot" ,None ,None ,[vara], mk_unop_ty varaTy)
let bitwise_shift_left_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "op_LeftShift" ,None ,None ,[vara], mk_shiftop_ty varaTy)
let bitwise_shift_right_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "op_RightShift" ,None ,None ,[vara], mk_shiftop_ty varaTy)
let unchecked_addition_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "op_Addition" ,None ,None ,[vara;varb;varc], mk_binop_ty3 varaTy varbTy varcTy)
let unchecked_subtraction_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "op_Subtraction" ,None ,None ,[vara;varb;varc], mk_binop_ty3 varaTy varbTy varcTy)
let unchecked_multiply_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "op_Multiply" ,None ,None ,[vara;varb;varc], mk_binop_ty3 varaTy varbTy varcTy)
let unchecked_unary_plus_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "op_UnaryPlus" ,None ,None ,[vara], mk_unop_ty varaTy)
let unchecked_unary_minus_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "op_UnaryNegation" ,None ,None ,[vara], mk_unop_ty varaTy)
let unchecked_unary_not_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "not" ,None ,Some "Not" ,[], mk_unop_ty bool_ty)
let raise_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "raise" ,None ,Some "Raise" ,[vara],([[mkSysNonGenericTy sys "Exception"]],varaTy))
let reraise_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "reraise" ,None ,Some "Reraise",[vara], ([[unit_ty]],varaTy))
let typeof_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "typeof" ,None ,Some "TypeOf" ,[vara], ([],system_Type_typ))
let methodhandleof_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "methodhandleof" ,None ,Some "MethodHandleOf",[vara;varb],([[varaTy --> varbTy]],system_RuntimeMethodHandle_typ))
let sizeof_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "sizeof" ,None ,Some "SizeOf" ,[vara], ([],int_ty))
let unchecked_defaultof_info = makeIntrinsicValRef(fslib_MFOperatorsUnchecked_nleref, "defaultof" ,None ,Some "DefaultOf",[vara], ([],varaTy))
let typedefof_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "typedefof" ,None ,Some "TypeDefOf",[vara], ([],system_Type_typ))
let enum_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "enum" ,None ,Some "ToEnum" ,[vara], ([[int_ty]],varaTy))
let range_op_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "op_Range" ,None ,None ,[vara], ([[varaTy];[varaTy]],mkSeqTy varaTy))
let range_int32_op_info = makeIntrinsicValRef(fslib_MFOperatorIntrinsics_nleref, "RangeInt32" ,None ,None ,[], ([[int_ty];[int_ty];[int_ty]],mkSeqTy int_ty))
let array2D_get_info = makeIntrinsicValRef(fslib_MFIntrinsicFunctions_nleref, "GetArray2D" ,None ,None ,[vara], ([[mkArrayType 2 varaTy];[int_ty]; [int_ty]],varaTy))
let array3D_get_info = makeIntrinsicValRef(fslib_MFIntrinsicFunctions_nleref, "GetArray3D" ,None ,None ,[vara], ([[mkArrayType 3 varaTy];[int_ty]; [int_ty]; [int_ty]],varaTy))
let array4D_get_info = makeIntrinsicValRef(fslib_MFIntrinsicFunctions_nleref, "GetArray4D" ,None ,None ,[vara], ([[mkArrayType 4 varaTy];[int_ty]; [int_ty]; [int_ty]; [int_ty]],varaTy))
let seq_collect_info = makeIntrinsicValRef(fslib_MFSeqModule_nleref, "collect" ,None ,Some "Collect",[vara;varb;varc],([[varaTy --> varbTy]; [mkSeqTy varaTy]], mkSeqTy varcTy))
let seq_delay_info = makeIntrinsicValRef(fslib_MFSeqModule_nleref, "delay" ,None ,Some "Delay" ,[varb], ([[unit_ty --> mkSeqTy varbTy]], mkSeqTy varbTy))
let seq_append_info = makeIntrinsicValRef(fslib_MFSeqModule_nleref, "append" ,None ,Some "Append" ,[varb], ([[mkSeqTy varbTy]; [mkSeqTy varbTy]], mkSeqTy varbTy))
let seq_using_info = makeIntrinsicValRef(fslib_MFRuntimeHelpers_nleref, "EnumerateUsing" ,None ,None ,[vara;varb;varc], ([[varaTy];[(varaTy --> varbTy)]],mkSeqTy varcTy))
let seq_generated_info = makeIntrinsicValRef(fslib_MFRuntimeHelpers_nleref, "EnumerateWhile" ,None ,None ,[varb], ([[unit_ty --> bool_ty]; [mkSeqTy varbTy]], mkSeqTy varbTy))
let seq_finally_info = makeIntrinsicValRef(fslib_MFRuntimeHelpers_nleref, "EnumerateThenFinally" ,None ,None ,[varb], ([[mkSeqTy varbTy]; [unit_ty --> unit_ty]], mkSeqTy varbTy))
let seq_of_functions_info = makeIntrinsicValRef(fslib_MFRuntimeHelpers_nleref, "EnumerateFromFunctions" ,None ,None ,[vara;varb],([[unit_ty --> varaTy]; [varaTy --> bool_ty]; [varaTy --> varbTy]], mkSeqTy varbTy))
let create_event_info = makeIntrinsicValRef(fslib_MFRuntimeHelpers_nleref, "CreateEvent" ,None ,None ,[vara;varb],([[varaTy --> unit_ty]; [varaTy --> unit_ty]; [(obj_ty --> (varbTy --> unit_ty)) --> varaTy]], TType_app (fslib_IEvent2_tcr, [varaTy;varbTy])))
let seq_to_array_info = makeIntrinsicValRef(fslib_MFSeqModule_nleref, "toArray" ,None ,Some "ToArray",[varb], ([[mkSeqTy varbTy]], mkArrayType 1 varbTy))
let seq_to_list_info = makeIntrinsicValRef(fslib_MFSeqModule_nleref, "toList" ,None ,Some "ToList" ,[varb], ([[mkSeqTy varbTy]], mkListTy varbTy))
let seq_map_info = makeIntrinsicValRef(fslib_MFSeqModule_nleref, "map" ,None ,Some "Map" ,[vara;varb],([[varaTy --> varbTy]; [mkSeqTy varaTy]], mkSeqTy varbTy))
let seq_singleton_info = makeIntrinsicValRef(fslib_MFSeqModule_nleref, "singleton" ,None ,Some "Singleton" ,[vara], ([[varaTy]], mkSeqTy varaTy))
let seq_empty_info = makeIntrinsicValRef(fslib_MFSeqModule_nleref, "empty" ,None ,Some "Empty" ,[vara], ([], mkSeqTy varaTy))
let new_format_info = makeIntrinsicValRef(fslib_MFCore_nleref, ".ctor" ,Some "PrintfFormat`5",None ,[vara;varb;varc;vard;vare], ([[string_ty]], mkPrintfFormatTy varaTy varbTy varcTy vardTy vareTy))
let sprintf_info = makeIntrinsicValRef(fslib_MFExtraTopLevelOperators_nleref, "sprintf" ,None ,Some "PrintFormatToStringThen",[vara], ([[mk_format4_ty varaTy unit_ty string_ty string_ty]], varaTy))
let lazy_force_info =
// Lazy\Value for > 4.0
makeIntrinsicValRef(fslib_MFLazyExtensions_nleref, "Force" ,Some "Lazy`1" ,None ,[vara], ([[mkLazyTy varaTy]; []], varaTy))
let lazy_create_info = makeIntrinsicValRef(fslib_MFLazyExtensions_nleref, "Create" ,Some "Lazy`1" ,None ,[vara], ([[unit_ty --> varaTy]], mkLazyTy varaTy))
let seq_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "seq" ,None ,Some "CreateSequence" ,[vara], ([[mkSeqTy varaTy]], mkSeqTy varaTy))
let splice_expr_info = makeIntrinsicValRef(fslib_MFExtraTopLevelOperators_nleref, "op_Splice" ,None ,None ,[vara], ([[mkQuotedExprTy varaTy]], varaTy))
let splice_raw_expr_info = makeIntrinsicValRef(fslib_MFExtraTopLevelOperators_nleref, "op_SpliceUntyped" ,None ,None ,[vara], ([[mkRawQuotedExprTy]], varaTy))
let new_decimal_info = makeIntrinsicValRef(fslib_MFIntrinsicFunctions_nleref, "MakeDecimal" ,None ,None ,[], ([[int_ty]; [int_ty]; [int_ty]; [bool_ty]; [byte_ty]], decimal_ty))
let array_get_info = makeIntrinsicValRef(fslib_MFIntrinsicFunctions_nleref, "GetArray" ,None ,None ,[vara], ([[mkArrayType 1 varaTy]; [int_ty]], varaTy))
let array_length_info = makeIntrinsicValRef(fslib_MFArrayModule_nleref, "length" ,None ,Some "Length" ,[vara], ([[mkArrayType 1 varaTy]], varaTy))
let unpickle_quoted_info = makeIntrinsicValRef(fslib_MFQuotations_nleref, "Deserialize" ,Some "Expr" ,None ,[], ([[system_Type_typ ;mkListTy system_Type_typ ;mkListTy mkRawQuotedExprTy ; mkArrayType 1 byte_ty]], mkRawQuotedExprTy ))
let cast_quotation_info = makeIntrinsicValRef(fslib_MFQuotations_nleref, "Cast" ,Some "Expr" ,None ,[vara], ([[mkRawQuotedExprTy]], mkQuotedExprTy varaTy))
let lift_value_info = makeIntrinsicValRef(fslib_MFQuotations_nleref, "Value" ,Some "Expr" ,None ,[vara], ([[varaTy]], mkRawQuotedExprTy))
let query_value_info = makeIntrinsicValRef(fslib_MFExtraTopLevelOperators_nleref, "query" ,None ,None ,[], ([], mkQueryBuilderTy) )
let query_run_value_info = makeIntrinsicValRef(fslib_MFQueryRunExtensionsLowPriority_nleref, "Run" ,Some "QueryBuilder" ,None ,[vara], ([[mkQueryBuilderTy];[mkQuotedExprTy varaTy]], varaTy) )
let query_run_enumerable_info = makeIntrinsicValRef(fslib_MFQueryRunExtensionsHighPriority_nleref, "Run" ,Some "QueryBuilder" ,None ,[vara], ([[mkQueryBuilderTy];[mkQuotedExprTy (mkQuerySourceTy varaTy (mkNonGenericTy tcref_System_Collections_IEnumerable)) ]], mkSeqTy varaTy) )
let query_for_value_info = makeIntrinsicValRef(fslib_MFLinq_nleref, "For" ,Some "QueryBuilder" ,None ,[vara; vard; varb; vare], ([[mkQueryBuilderTy];[mkQuerySourceTy varaTy vardTy;varaTy --> mkQuerySourceTy varbTy vareTy]], mkQuerySourceTy varbTy vardTy) )
let query_select_value_info = makeIntrinsicValRef(fslib_MFLinq_nleref, "Select" ,Some "QueryBuilder" ,None ,[vara; vare; varb], ([[mkQueryBuilderTy];[mkQuerySourceTy varaTy vareTy;varaTy --> varbTy]], mkQuerySourceTy varbTy vareTy) )
let query_yield_value_info = makeIntrinsicValRef(fslib_MFLinq_nleref, "Yield" ,Some "QueryBuilder" ,None ,[vara; vare], ([[mkQueryBuilderTy];[varaTy]], mkQuerySourceTy varaTy vareTy) )
let query_yield_from_value_info = makeIntrinsicValRef(fslib_MFLinq_nleref, "YieldFrom" ,Some "QueryBuilder" ,None ,[vara; vare], ([[mkQueryBuilderTy];[mkQuerySourceTy varaTy vareTy]], mkQuerySourceTy varaTy vareTy) )
let query_source_info = makeIntrinsicValRef(fslib_MFLinq_nleref, "Source" ,Some "QueryBuilder" ,None ,[vara], ([[mkQueryBuilderTy];[mkSeqTy varaTy ]], mkQuerySourceTy varaTy (mkNonGenericTy tcref_System_Collections_IEnumerable)) )
let query_source_as_enum_info = makeIntrinsicValRef(fslib_MFLinq_nleref, "get_Source" ,Some "QuerySource`2" ,None ,[vara; vare], ([[mkQuerySourceTy varaTy vareTy];[]], mkSeqTy varaTy) )
let new_query_source_info = makeIntrinsicValRef(fslib_MFLinq_nleref, ".ctor" ,Some "QuerySource`2" ,None ,[vara; vare], ([[mkSeqTy varaTy]], mkQuerySourceTy varaTy vareTy) )
let query_where_value_info = makeIntrinsicValRef(fslib_MFLinq_nleref, "Where" ,Some "QueryBuilder" ,None ,[vara; vare], ([[mkQueryBuilderTy];[mkQuerySourceTy varaTy vareTy;varaTy --> bool_ty]], mkQuerySourceTy varaTy vareTy) )
let query_zero_value_info = makeIntrinsicValRef(fslib_MFLinq_nleref, "Zero" ,Some "QueryBuilder" ,None ,[vara; vare], ([[mkQueryBuilderTy];[]], mkQuerySourceTy varaTy vareTy) )
let fail_init_info = makeIntrinsicValRef(fslib_MFIntrinsicFunctions_nleref, "FailInit" ,None ,None ,[], ([[unit_ty]], unit_ty))
let fail_static_init_info = makeIntrinsicValRef(fslib_MFIntrinsicFunctions_nleref, "FailStaticInit" ,None ,None ,[], ([[unit_ty]], unit_ty))
let check_this_info = makeIntrinsicValRef(fslib_MFIntrinsicFunctions_nleref, "CheckThis" ,None ,None ,[vara], ([[varaTy]], varaTy))
let quote_to_linq_lambda_info = makeIntrinsicValRef(fslib_MFLinqRuntimeHelpersQuotationConverter_nleref, "QuotationToLambdaExpression" ,None ,None ,[vara], ([[mkQuotedExprTy varaTy]], mkLinqExpressionTy varaTy))
{ ilg=ilg;
#if NO_COMPILER_BACKEND
#else
ilxPubCloEnv=EraseIlxFuncs.new_cenv(ilg)
#endif
knownIntrinsics = knownIntrinsics
knownFSharpCoreModules = knownFSharpCoreModules
compilingFslib = compilingFslib;
mlCompatibility = mlCompatibility;
emitDebugInfoInQuotations = emitDebugInfoInQuotations
directoryToResolveRelativePaths= directoryToResolveRelativePaths;
unionCaseRefEq = unionCaseRefEq;
valRefEq = valRefEq;
fslibCcu = fslibCcu;
using40environment = using40environment;
indirectCallArrayMethods = indirectCallArrayMethods;
sysCcu = sysCcu;
refcell_tcr_canon = mk_MFCore_tcref fslibCcu "Ref`1";
option_tcr_canon = mk_MFCore_tcref fslibCcu "Option`1";
list_tcr_canon = mk_MFCollections_tcref fslibCcu "List`1";
set_tcr_canon = mk_MFCollections_tcref fslibCcu "Set`1";
map_tcr_canon = mk_MFCollections_tcref fslibCcu "Map`2";
lazy_tcr_canon = lazy_tcr;
refcell_tcr_nice = mk_MFCore_tcref fslibCcu "ref`1";
array_tcr_nice = il_arr_tcr_map.[0];
option_tcr_nice = option_tcr_nice;
list_tcr_nice = list_tcr_nice;
lazy_tcr_nice = lazy_tcr_nice;
format_tcr = format_tcr;
expr_tcr = expr_tcr;
raw_expr_tcr = raw_expr_tcr;
nativeint_tcr = nativeint_tcr;
int32_tcr = int32_tcr;
int16_tcr = int16_tcr;
int64_tcr = int64_tcr;
uint16_tcr = uint16_tcr;