Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Mayr <mayr_michael@gmx.at>2017-05-16 18:46:43 +0300
committerJan Kotas <jkotas@microsoft.com>2017-05-16 18:46:43 +0300
commitb71da7ab8db264db1c08b5a044710cde38bf53d1 (patch)
tree8f21b4025a92b8de20e8cc5bc1b570e77b031463 /src
parentc78fd42d4a2025bda10093e636833c178266d121 (diff)
Implemented ImportUnaryOperation (#3624)
Diffstat (limited to 'src')
-rw-r--r--src/ILVerify/src/ILImporter.Verify.cs17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/ILVerify/src/ILImporter.Verify.cs b/src/ILVerify/src/ILImporter.Verify.cs
index c5c4fcfd9..726ccb6f2 100644
--- a/src/ILVerify/src/ILImporter.Verify.cs
+++ b/src/ILVerify/src/ILImporter.Verify.cs
@@ -1474,7 +1474,22 @@ namespace Internal.IL
void ImportUnaryOperation(ILOpcode opCode)
{
- throw new NotImplementedException($"{nameof(ImportUnaryOperation)} not implemented");
+ var operand = Pop();
+
+ switch (opCode)
+ {
+ case ILOpcode.neg:
+ CheckIsNumeric(operand);
+ break;
+ case ILOpcode.not:
+ CheckIsInteger(operand);
+ break;
+ default:
+ Debug.Assert(false, "Unexpected branch opcode");
+ break;
+ }
+
+ Push(StackValue.CreatePrimitive(operand.Kind));
}
void ImportCpOpj(int token)