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

Commite7f029f

Browse files
dsymelatkin
authored andcommitted
cleanup to align Visual F# Tools codebase textually with github.com/fsharp/fsharp
commit c329c8b003bb56ba92011823e0be491bfe05870bAuthor: latkin <latkin@microsoft.com>Date: Fri Dec 12 15:11:44 2014 -0800 Patching project system and tests to avoid using removed APIscommit f5c50b54e8b292f0de676951ae291da9176c6308Author: Don Syme <dsyme@microsoft.com>Date: Mon Dec 1 14:32:36 2014 +0000 cleanup to align Visual F# Tools codebase textually with github.com/fsharp/fsharp
1 parent91c644d commite7f029f

File tree

16 files changed

+107
-91
lines changed

16 files changed

+107
-91
lines changed

‎src/absil/ilreflect.fs‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,14 @@ let convFieldInit x =
601601
// This is gross. TypeBuilderInstantiation should really be a public type, since we
602602
// have to use alternative means for various Method/Field/Constructor lookups. However since
603603
// it isn't we resort to this technique...
604-
letTypeBuilderInstantiationT= Type.GetType("System.Reflection.Emit.TypeBuilderInstantiation")
604+
letTypeBuilderInstantiationT=
605+
letty=
606+
if runningOnMonothen
607+
Type.GetType("System.Reflection.MonoGenericClass")
608+
else
609+
Type.GetType("System.Reflection.Emit.TypeBuilderInstantiation")
610+
assert(not(isNull ty))
611+
ty
605612

606613
lettypeIsNotQueryable(typ:Type)=
607614
(typ:? TypeBuilder)||((typ.GetType()).Equals(TypeBuilderInstantiationT))

‎src/fsharp/FSStrings.resx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<root>
33
<!--
44
Microsoft ResX Schema

‎src/fsharp/FSharp.Core/FSCore.resx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<root>
33
<!--
44
Microsoft ResX Schema

‎src/fsharp/FSharp.Core/control.fs‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ namespace Microsoft.FSharp.Control
403403

404404
[<AllowNullLiteral>]
405405
typeTrampoline()=
406-
406+
407407
[<Literal>]
408408
static letbindLimitBeforeHijack=300
409409
#if FX_NO_THREAD_STATIC
@@ -419,11 +419,12 @@ namespace Microsoft.FSharp.Control
419419
#else
420420
Trampoline.thisThreadHasTrampoline
421421
#endif
422+
422423
let mutablecont= None
423424
let mutablebindCount=0
424425

425426
static letunfake FakeUnit=()
426-
427+
427428
// Install a trampolineStack if none exists
428429
memberthis.ExecuteAction(firstAction:unit->FakeUnitValue)=
429430
let recloop action=
@@ -446,6 +447,7 @@ namespace Microsoft.FSharp.Control
446447
loop firstAction
447448
finally
448449
#if FX_NO_THREAD_STATIC
450+
()
449451
#else
450452
if thisIsTopTrampolinethen
451453
Trampoline.thisThreadHasTrampoline<-false

‎src/fsharp/FSharp.Core/printf.fs‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ module internal PrintfImpl =
131131

132132
letparseTypeChar(s:string)i:char* int=
133133
s.[i],(i+1)
134-
134+
135135
letfindNextFormatSpecifier(s:string)i=
136136
let recgo i(buf:Text.StringBuilder)=
137137
if i>= s.Lengththen
@@ -157,7 +157,7 @@ module internal PrintfImpl =
157157
buf.Append(c)|> ignore
158158
go(i+1) buf
159159
go i(Text.StringBuilder())
160-
160+
161161
/// Abstracts generated printer from the details of particular environment: how to write text, how to produce results etc...
162162
[<AbstractClass>]
163163
typePrintfEnv<'State,'Residue,'Result>=
@@ -400,8 +400,8 @@ module internal PrintfImpl =
400400
env.Write s2
401401
env.Finalize()
402402
)
403-
)
404-
403+
)
404+
405405
static memberPercentStarFinal1(s1:string,s2:string)=
406406
(fun(env: unit-> PrintfEnv<'State, 'Residue, 'Result>)->
407407
(fun(_star1: int)->
@@ -1266,7 +1266,11 @@ module internal PrintfImpl =
12661266
)
12671267
#endif
12681268

1269-
[<DefaultValue; ThreadStatic>]
1269+
[<DefaultValue>]
1270+
#if FX_NO_THREAD_STATIC
1271+
#else
1272+
[<ThreadStatic>]
1273+
#endif
12701274
static val mutableprivatelast:string* CachedItem<'T, 'State, 'Residue, 'Result>
12711275
12721276
static member Get(key: Format<'T, 'State, 'Residue, 'Result>)=

‎src/fsharp/InternalFileSystemUtils.fs‎

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,15 @@ open System.IO
2424
openSystem.Diagnostics
2525

2626
typeinternalFile()=
27-
static memberSafeExists filename=
28-
Debug.Assert(Path.IsPathRooted(filename), sprintf"SafeExists: '%s' is not absolute" filename)
29-
System.IO.File.Exists(filename)
30-
static memberSafeNewFileStream(filename:string,mode:FileMode,access:FileAccess,share:FileShare)=
31-
new FileStream(filename,mode,access,share)
27+
static memberSafeExists filename= FileSystem.SafeExists filename
28+
//static member SafeNewFileStream(filename:string,mode:FileMode,access:FileAccess,share:FileShare) =
29+
// FileSystem new FileStream(filename,mode,access,share)
3230

3331
typeinternalPath()=
34-
/// Take in a Windows filename with an absolute path, and return the same filename
35-
/// but canonicalized with respect to extra path separators (e.g. C:\\\\foo.txt)
36-
/// and '..' portions
37-
static memberSafeGetFullPath filename=
38-
Debug.Assert(Path.IsPathRooted(filename), sprintf"SafeGetFullPath: '%s' is not absolute" filename)
39-
System.IO.Path.GetFullPath(filename)
4032

4133
static memberIsInvalidDirectory(path:string)=
4234
path=null|| path.IndexOfAny(Path.GetInvalidPathChars())<>-1
4335

44-
static memberIsInvalidFilename(filename:string)=
45-
String.IsNullOrEmpty(filename)|| filename.IndexOfAny(Path.GetInvalidFileNameChars())<>-1
46-
4736
static memberIsInvalidPath(path:string)=
4837
if String.IsNullOrEmpty(path)thentrue
4938
else

‎src/fsharp/InternalFileSystemUtils.fsi‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@ namespace Internal.Utilities.FileSystem
55
[<Class>]
66
typeinternalFile=
77
static memberSafeExists:filename:string->bool
8-
static memberSafeNewFileStream:filename:string* mode:System.IO.FileMode* access:System.IO.FileAccess* share:System.IO.FileShare-> System.IO.FileStream
98

109
[<Class>]
1110
type internal Path=
12-
static memberSafeGetFullPath:filename:string->string
1311
static memberIsInvalidDirectory:path:string->bool
14-
static memberIsInvalidFilename:filename:string->bool
1512
static memberIsInvalidPath:path:string->bool

‎src/fsharp/fsi/console.fs‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ open Internal.Utilities
1111
/// When this fix flag is true, this byte is converted to a char using the System.Console.InputEncoding.
1212
/// This is a code-around for bug://1345.
1313
/// Fixes to System.Console.ReadKey may break this code around, hence the option here.
14-
moduleConsoleOptions=
14+
moduleinternalConsoleOptions=
1515

1616
// Bug 4254 was fixed in Dev11 (Net4.5), so this flag tracks making this fix up version specific.
1717
letfixupRequired=not FSharpEnvironment.IsRunningOnNetFx45OrAbove
@@ -34,10 +34,10 @@ module ConsoleOptions =
3434
else
3535
c
3636

37-
typeStyle= Prompt| Out| Error
37+
typeinternalStyle= Prompt| Out| Error
3838

3939
/// Class managing the command History.
40-
typeHistory()=
40+
typeinternalHistory()=
4141
letlist=new List<string>()
4242
let mutablecurrent=0
4343

@@ -72,14 +72,14 @@ type History() =
7272

7373
/// List of available optionsCache
7474
75-
typeOptions()=
75+
typeinternalOptions()=
7676
inherit History()
7777
let mutableroot=""
7878
memberx.Rootwith get()= rootandset(v)=(root<- v)
7979

8080
/// Cursor position management
8181
82-
moduleUtils=
82+
moduleinternalUtils=
8383

8484
openSystem
8585
openSystem.Reflection
@@ -128,7 +128,7 @@ module Utils =
128128

129129

130130
[<Sealed>]
131-
typeCursor=
131+
typeinternalCursor=
132132
static memberResetTo(top,left)=
133133
Utils.guard(fun()->
134134
Console.CursorTop<- min top(Console.BufferHeight-1);
@@ -139,7 +139,7 @@ type Cursor =
139139
letleft= inset+ position%(Console.BufferWidth- inset)
140140
Cursor.ResetTo(top,left)
141141

142-
typeAnchor=
142+
typeinternalAnchor=
143143
{top:int; left:int}
144144
static memberCurrent(inset)={top=Console.CursorTop;left= max inset Console.CursorLeft}
145145

@@ -149,7 +149,7 @@ type Anchor =
149149
lettop= p.top+((p.left- inset)+ index)/(Console.BufferWidth- inset)
150150
Cursor.ResetTo(top,left)
151151

152-
typeReadLineConsole()=
152+
typeinternalReadLineConsole()=
153153
lethistory=new History()
154154
let mutablecomplete:(string option* string-> seq<string>) =fun(_s1,_s2)-> Seq.empty
155155
memberx.SetCompletionFunction f= complete<- f

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp