From: Jan Kotas Date: Tue, 25 Jun 2019 20:22:23 +0000 (-0700) Subject: Fix StackChange value for OpCodes.Stelem (#25382) X-Git-Tag: accepted/tizen/unified/20190813.215958~40^2~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=52f10ff250d2a7bfdd8bf98299c8005aa2956659;p=platform%2Fupstream%2Fcoreclr.git Fix StackChange value for OpCodes.Stelem (#25382) Fixes dotnet/corefx#37955 --- diff --git a/src/System.Private.CoreLib/shared/System/Reflection/Emit/OpCodes.cs b/src/System.Private.CoreLib/shared/System/Reflection/Emit/OpCodes.cs index 7690005..07c4b1c 100644 --- a/src/System.Private.CoreLib/shared/System/Reflection/Emit/OpCodes.cs +++ b/src/System.Private.CoreLib/shared/System/Reflection/Emit/OpCodes.cs @@ -2,6 +2,16 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +/*============================================================ +** +** Class: OpCodes +** +** Purpose: Exposes all of the IL instructions supported by the runtime. +** +** THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT BY HAND! +** See $(RepoRoot)\src\inc\OpCodeGen.pl for more information.** +==============================================================*/ + namespace System.Reflection.Emit { // @@ -1875,7 +1885,7 @@ namespace System.Reflection.Emit ((int)StackBehaviour.Popref_popi_pop1 << OpCode.StackBehaviourPopShift) | ((int)StackBehaviour.Push0 << OpCode.StackBehaviourPushShift) | (1 << OpCode.SizeShift) | - (0 << OpCode.StackChangeShift) + (-3 << OpCode.StackChangeShift) ); public static readonly OpCode Unbox_Any = new OpCode(OpCodeValues.Unbox_Any, diff --git a/src/inc/OpCodeGen.pl b/src/inc/OpCodeGen.pl index c29d497..64ba130 100644 --- a/src/inc/OpCodeGen.pl +++ b/src/inc/OpCodeGen.pl @@ -46,8 +46,8 @@ $endHeaderComment = "**\n** THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT BY $endHeaderComment .= "** See \$(RepoRoot)\\src\\inc\\OpCodeGen.pl for more information.**\n"; $endHeaderComment .= "==============================================================*/\n\n"; -$usingAndRefEmitNmsp = "using System;\n\nnamespace System.Reflection.Emit\n{\n\n"; -$obsoleteAttr = " [Obsolete(\"This API has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202\")]\n"; +$usingAndRefEmitNmsp = "namespace System.Reflection.Emit\n{\n\n"; +$obsoleteAttr = " [Obsolete(\"This API has been deprecated. https://go.microsoft.com/fwlink/?linkid=14202\")]\n"; # Open source file and target files @@ -298,7 +298,7 @@ while () { $popstate = $popstate -2; } - elsif ($pop eq "Popi_popi_popi" || $pop eq "Popref_popi_popi" || $pop eq "Popref_popi_popi8" || $pop eq "Popref_popi_popr4" || $pop eq "Popref_popi_popr8" || $pop eq "Popref_popi_popref") + elsif ($pop eq "Popi_popi_popi" || $pop eq "Popref_popi_popi" || $pop eq "Popref_popi_popi8" || $pop eq "Popref_popi_popr4" || $pop eq "Popref_popi_popr8" || $pop eq "Popref_popi_popref" || $pop eq "Popref_popi_pop1") { $popstate = $popstate -3; } @@ -473,7 +473,7 @@ print OUTPUT " case OperandType.ShortInlineBrTarget:\n"; print OUTPUT " case OperandType.ShortInlineI:\n"; print OUTPUT " case OperandType.ShortInlineVar:\n"; print OUTPUT " return true;\n"; -print OUTPUT " };\n"; +print OUTPUT " }\n"; print OUTPUT " return false;\n"; print OUTPUT " }\n";