@@ -2824,15 +2824,6 @@ namespace Microsoft.FSharp.Core
28242824
28252825let CheckedMultiplyDynamic < 'T , 'U , 'V > x n = CheckedMultiplyDynamicImplTable< 'T, 'U, 'V>. Impl x n
28262826
2827- #if FX_ NO_ LAZY
2828-
2829- type internal PrivateEnvironment =
2830- static member internal GetResourceString ( name : string , _arguments : obj []) = name
2831- static member internal GetResourceString ( name : string ) = name
2832-
2833- #else
2834- #endif
2835-
28362827
28372828namespace System
28382829
@@ -6175,84 +6166,6 @@ namespace Microsoft.FSharp.Core
61756166if n>= 0 then PowDecimal x nelse 1.0 M/ PowDecimal x n)
61766167
61776168
6178-
6179-
6180-
6181-
6182-
6183- //============================================================================
6184- //============================================================================
6185- #if FX_ NO_ LAZY
6186- namespace System
6187- open System.Diagnostics
6188- open Microsoft.FSharp .Core
6189- open Microsoft.FSharp .Core .Operators
6190-
6191-
6192- type LazyFailure ( exn : exn ) =
6193- static let undefined = LazyFailure( InvalidOperationException( " a lazy value was accessed during its own initialization" ))
6194- member x.Exception = exn
6195- static member Undefined = undefined
6196-
6197- [<AllowNullLiteral>]
6198- type Lazy < 'T >( value : 'T , funcOrException : obj ) =
6199-
6200- /// This field holds the result of a successful computation. It's initial value is Unchecked.defaultof
6201- let mutable value = value
6202-
6203- /// This field holds either the function to run or a LazyFailure object recording the exception raised
6204- /// from running the function. It is null if the thunk has been evaluated successfully.
6205- [<VolatileField>]
6206- let mutable funcOrException = funcOrException
6207-
6208- static member Create ( f : ( unit -> 'T )) : Lazy < 'T > =
6209- Lazy< 'T> ( value= Unchecked.defaultof< 'T>, funcOrException= box( f) )
6210- static member CreateFromValue ( x : 'T ) : Lazy < 'T > =
6211- Lazy< 'T> ( value= x, funcOrException= null )
6212- member x.IsValueCreated = ( match funcOrExceptionwith null -> true | _ -> false )
6213- member x.Value =
6214- match funcOrExceptionwith
6215- | null -> value
6216- | _ ->
6217- // Enter the lock in case another thread is in the process of evaluating the result
6218- System.Threading.Monitor.Enter( x);
6219- try
6220- match funcOrExceptionwith
6221- | null -> value
6222- | :? LazyFailureas res->
6223- raise( res.Exception)
6224- | :? ( unit-> 'T) as f->
6225- funcOrException<- box( LazyFailure.Undefined)
6226- try
6227- let res = f()
6228- value<- res;
6229- funcOrException<- null ;
6230- res
6231- with e->
6232- funcOrException<- box( new LazyFailure( e));
6233- reraise()
6234- | _ ->
6235- failwith" unreachable"
6236- finally
6237- System.Threading.Monitor.Exit( x)
6238- override x.ToString () =
6239- if x.IsValueCreatedthen
6240- if box x.Value= null then
6241- " <null>"
6242- else
6243- x.Value.ToString()
6244- else
6245- match funcOrExceptionwith
6246- | :? LazyFailureas res->
6247- match res.Exceptionwith
6248- | ewhen System.Runtime.CompilerServices.RuntimeHelpers.Equals( e, LazyFailure.Undefined) -> " <evaluating>"
6249- | e-> e.ToString()
6250- | _ ->
6251- " <unevaluated>"
6252-
6253- #else
6254- #endif
6255-
62566169namespace Microsoft.FSharp.Control
62576170
62586171open System
@@ -6263,15 +6176,6 @@ namespace Microsoft.FSharp.Control
62636176
62646177module LazyExtensions =
62656178type System.Lazy < 'T > with
6266- #if FX_ NO_ LAZY
6267- [<CompiledName( " Create" ) >] // give the extension member a 'nice', unmangled compiled name, unique within this module
6268- static member Create ( f : unit -> 'T ) : Lazy < 'T > =
6269- System.Lazy< 'T> ( value= Unchecked.defaultof< 'T>, funcOrException= box( f) )
6270-
6271- [<CompiledName( " CreateFromValue" ) >] // give the extension member a 'nice', unmangled compiled name, unique within this module
6272- static member CreateFromValue ( x : 'T ) : Lazy < 'T > =
6273- System.Lazy< 'T> ( value= x, funcOrException= null )
6274- #else
62756179[<CompiledName( " Create" ) >] // give the extension member a 'nice', unmangled compiled name, unique within this module
62766180static member Create ( f : unit -> 'T ) : System.Lazy < 'T > =
62776181let creator = new System.Func< 'T>( f)
@@ -6280,7 +6184,7 @@ namespace Microsoft.FSharp.Control
62806184[<CompiledName( " CreateFromValue" ) >] // give the extension member a 'nice', unmangled compiled name, unique within this module
62816185static member CreateFromValue ( value : 'T ) : System.Lazy < 'T > =
62826186 System.Lazy< 'T>. Create( fun () -> value)
6283- #endif
6187+
62846188[<CompiledName( " IsDelayedDeprecated" ) >] // give the extension member a 'nice', unmangled compiled name, unique within this module
62856189member x.IsDelayed = not ( x.IsValueCreated)
62866190