diff --git a/src/fsharp/ilxgen.fs b/src/fsharp/ilxgen.fs index 58e4d8ee5ac..c641273c19e 100644 --- a/src/fsharp/ilxgen.fs +++ b/src/fsharp/ilxgen.fs @@ -3137,6 +3137,8 @@ and GenAsmCode cenv cgbuf eenv (il,tyargs,args,returnTys,m) sequel = | I_stobj (a,b,ILType.TypeVar _) ,[tyarg] -> I_stobj (a,b,tyarg) | I_ldtoken (ILToken.ILType (ILType.TypeVar _)),[tyarg] -> I_ldtoken (ILToken.ILType (tyarg)) | I_sizeof (ILType.TypeVar _) ,[tyarg] -> I_sizeof (tyarg) + | I_cpobj (ILType.TypeVar _) ,[tyarg] -> I_cpobj (tyarg) // currently unused, added for forward compat, see https://visualfsharp.codeplex.com/SourceControl/network/forks/jackpappas/fsharpcontrib/contribution/7134 + | I_initobj (ILType.TypeVar _) ,[tyarg] -> I_initobj (tyarg) // currently unused, added for forward compat, see https://visualfsharp.codeplex.com/SourceControl/network/forks/jackpappas/fsharpcontrib/contribution/7134 | I_ldfld (al,vol,fspec) ,_ -> I_ldfld (al,vol,modFieldSpec fspec) | I_ldflda (fspec) ,_ -> I_ldflda (modFieldSpec fspec) | I_stfld (al,vol,fspec) ,_ -> I_stfld (al,vol,modFieldSpec fspec) diff --git a/src/fsharp/pickle.fs b/src/fsharp/pickle.fs index 62a3d2eb31a..1eccd8c1ff4 100644 --- a/src/fsharp/pickle.fs +++ b/src/fsharp/pickle.fs @@ -1065,6 +1065,10 @@ let [] itag_ldelem_any = 59 let [] itag_stelem_any = 60 let [] itag_unbox_any = 61 let [] itag_ldlen_multi = 62 +let [] itag_initobj = 63 // currently unused, added for forward compat, see https://visualfsharp.codeplex.com/SourceControl/network/forks/jackpappas/fsharpcontrib/contribution/7134 +let [] itag_initblk = 64 // currently unused, added for forward compat +let [] itag_cpobj = 65 // currently unused, added for forward compat +let [] itag_cpblk = 66 // currently unused, added for forward compat let simple_instrs = [ itag_add, AI_add; @@ -1099,7 +1103,11 @@ let simple_instrs = itag_localloc, I_localloc; itag_throw, I_throw; itag_ldlen, I_ldlen; - itag_rethrow, I_rethrow; ] + itag_rethrow, I_rethrow; + itag_rethrow, I_rethrow; + itag_initblk, I_initblk (Aligned,Nonvolatile); + itag_cpblk, I_cpblk (Aligned,Nonvolatile); + ] let encode_table = Dictionary<_,_>(300, HashIdentity.Structural) let _ = List.iter (fun (icode,i) -> encode_table.[i] <- icode) simple_instrs @@ -1135,7 +1143,11 @@ let decoders = itag_stobj, u_ILType >> (fun c -> I_stobj (Aligned,Nonvolatile,c)); itag_sizeof, u_ILType >> I_sizeof; itag_ldlen_multi, u_tup2 u_int32 u_int32 >> (fun (a,b) -> EI_ldlen_multi (a,b)); - itag_ilzero, u_ILType >> EI_ilzero; ] + itag_ilzero, u_ILType >> EI_ilzero; + itag_ilzero, u_ILType >> EI_ilzero; + itag_initobj, u_ILType >> I_initobj; + itag_cpobj, u_ILType >> I_cpobj; + ] let decode_tab = let tab = Array.init 256 (fun n -> (fun st -> ufailwith st ("no decoder for instruction "+string n))) @@ -1180,6 +1192,8 @@ let p_ILInstr x st = | I_sizeof ty -> p_byte itag_sizeof st; p_ILType ty st | EI_ldlen_multi (n,m) -> p_byte itag_ldlen_multi st; p_tup2 p_int32 p_int32 (n,m) st | EI_ilzero a -> p_byte itag_ilzero st; p_ILType a st + | I_initobj c -> p_byte itag_initobj st; p_ILType c st + | I_cpobj c -> p_byte itag_cpobj st; p_ILType c st | i -> pfailwith st (sprintf "the IL instruction '%+A' cannot be emitted" i) #endif