Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit83aa5f2

Browse files
committed
Changes to bring F# 3.0 library and compiler up on Mono 2.0 profile
Building for the Mono 2.0 profile needed a few tweaks - some files areexcluded.
1 parent35979b0 commit83aa5f2

File tree

9 files changed

+39
-9
lines changed

9 files changed

+39
-9
lines changed

‎config.make.in‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,7 @@ DEFINES_4_0 = \
7474
--define:FX_NO_BIGINT_CULTURE_PARSE \
7575
--define:FX_ATLEAST_40 \
7676
--define:FX_ATLEAST_35 \
77-
--define:QUERIES_IN_FSLIB \
78-
--define:PUT_TYPE_PROVIDERS_IN_FSCORE \
79-
--define:FX_ATLEAST_LINQ \
80-
--define:BE_SECURITY_TRANSPARENT
77+
--define:FX_ATLEAST_LINQ
8178

8279
REFERENCES_2_0 = \
8380
-r:$(monolibdir)Microsoft.Build.Engine.dll \

‎src/fsharp/FSharp.Compiler/Makefile.in‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ FLAGS += \
1515
DEFINES +=\
1616
--define:COMPILER\
1717
--define:INCLUDE_METADATA_READER\
18-
--define:INCLUDE_METADATA_WRITER\
19-
--define:EXTENSIONTYPING
18+
--define:INCLUDE_METADATA_WRITER
19+
20+
DEFINES_4_0=\
21+
--define:EXTENSIONTYPING
2022

2123
REFERENCES +=\
2224
-r:$(outdir)FSharp.Core.dll\

‎src/fsharp/FSharp.Core/Makefile.in‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ FLAGS_2_0 += \
1313
--compiling-fslib\
1414
--nowarn:75,1204\
1515
--target:library\
16-
--compiling-fslib-20:$(monolibdir)mscorlib.dll\
16+
--compiling-fslib-20:$(monolibdir)../4.0/mscorlib.dll\
1717
--extraoptimizationloops:1
1818

1919
FLAGS_4_0 +=\
@@ -22,6 +22,9 @@ FLAGS_4_0 += \
2222
--nowarn:75,1204\
2323
--target:library\
2424
--compiling-fslib-40\
25+
--define:BE_SECURITY_TRANSPARENT\
26+
--define:QUERIES_IN_FSLIB\
27+
--define:PUT_TYPE_PROVIDERS_IN_FSCORE\
2528
--extraoptimizationloops:1
2629

2730
DEFINES +=\

‎src/fsharp/est.fs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
namespaceMicrosoft.FSharp.Compiler
1616

17+
#if EXTENSIONTYPING
18+
1719
moduleinternalExtensionTyping=
1820
openSystem
1921
openSystem.IO
@@ -1342,3 +1344,4 @@ module internal ExtensionTyping =
13421344
letIsGeneratedTypeDirectReference(st:Tainted<ProvidedType>,m)=
13431345
st.PUntaint((fun st-> st.TryGetTyconRef()|> isNone), m)
13441346

1347+
#endif

‎src/fsharp/est.fsi‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
namespaceMicrosoft.FSharp.Compiler
1515

16+
#if EXTENSIONTYPING
17+
1618
moduleinternalExtensionTyping=
1719

1820
openSystem
@@ -359,3 +361,5 @@ module internal ExtensionTyping =
359361
static memberCreateNew:unit->ProvidedAssemblyStaticLinkingMap
360362

361363
valIsGeneratedTypeDirectReference:Tainted<ProvidedType>* range-> bool
364+
365+
#endif

‎src/fsharp/tainted.fs‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
namespaceMicrosoft.FSharp.Compiler
2+
3+
#if EXTENSIONTYPING
4+
25
openSystem
36
openMicrosoft.FSharp.Compiler.Range
47
openMicrosoft.FSharp.Core.CompilerServices
@@ -160,4 +163,7 @@ module internal Tainted =
160163
letEqTainted(t1:Tainted<'T>)(t2:Tainted<'T>)=
161164
t1.PUntaintNoFailure(fun t1-> t1=== t2.AccessObjectDirectly)
162165

163-
letGetHashCodeTainted(t:Tainted<'T>)= t.PUntaintNoFailure(fun t-> hash t)
166+
letGetHashCodeTainted(t:Tainted<'T>)= t.PUntaintNoFailure(fun t-> hash t)
167+
168+
#endif
169+

‎src/fsharp/tainted.fsi‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
namespaceMicrosoft.FSharp.Compiler
2+
3+
#if EXTENSIONTYPING
4+
5+
26
openSystem
37
openSystem.Reflection
48
openMicrosoft.FSharp.Core.CompilerServices
@@ -91,3 +95,5 @@ module internal Tainted =
9195
valEqTainted:Tainted<'T>->Tainted<'T>->bool when 'T:equality and 'T:not struct
9296
/// Compute the hash value for the tainted value
9397
valGetHashCodeTainted:Tainted<'T>->int when 'T:equality
98+
99+
#endif

‎src/fsharp/vs/ServiceDeclarations.fs‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,10 @@ module internal ItemDescriptionsImpl =
197197

198198
// Provided type definitions do not have a useful F# CCU for the purposes of goto-definition.
199199
letcomputeCcuOfTyconRef(tcref:TyconRef)=
200-
if tcref.IsProvidedthen Noneelse ccuOfTyconRef tcref
200+
#if EXTENSIONTYPING
201+
if tcref.IsProvidedthen Noneelse
202+
#endif
203+
ccuOfTyconRef tcref
201204

202205
let recccuOfItem g d=
203206
match dwith

‎src/fsharp/vs/service.fs‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,9 @@ type (* internal *) Method =
268268
typeMethodOverloads(name: string,unsortedMethods: Method[])=
269269
// BUG 413009 : [ParameterInfo] takes about 3 seconds to move from one overload parameter to another
270270
// cache allows to avoid recomputing parameterinfo for the same item
271+
#if FX_ATLEAST_40
271272
static letmethodOverloadsCache= System.Runtime.CompilerServices.ConditionalWeakTable()
273+
#endif
272274

273275
letmethods=
274276
unsortedMethods
@@ -285,9 +287,11 @@ type MethodOverloads( name: string, unsortedMethods: Method[] ) =
285287
if isNil itemsthennew MethodOverloads("",[||])else
286288
letname= DisplayNameOfItem g items.Head
287289
letgetOverloadsForItem item=
290+
#if FX_ATLEAST_40
288291
match methodOverloadsCache.TryGetValue itemwith
289292
|true, overloads-> overloads
290293
|false,_->
294+
#endif
291295
letitems=
292296
match itemwith
293297
| Item.MethodGroup(nm,minfos)-> List.map(fun minfo-> Item.MethodGroup(nm,[minfo])) minfos
@@ -326,7 +330,9 @@ type MethodOverloads( name: string, unsortedMethods: Method[] ) =
326330
Parameters= Array.ofList(Params.ParamsOfItem infoReader m denv item)
327331
IsStaticArguments=match itemwith| Item.Types_->true|_->false
328332
})
333+
#if FX_ATLEAST_40
329334
methodOverloadsCache.Add(item, methods)
335+
#endif
330336
methods
331337
letmethods=[|for itemin itemsdoyield! getOverloadsForItem item|]
332338

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp