summaryrefslogtreecommitdiff
path: root/BCT/BytecodeTranslator/TranslationHelper.cs
diff options
context:
space:
mode:
authorGravatar Mike Barnett <mbarnett@microsoft.com>2011-05-29 15:07:01 -0700
committerGravatar Mike Barnett <mbarnett@microsoft.com>2011-05-29 15:07:01 -0700
commit7d06797fc12bea25e294a776c87a53f88bb87031 (patch)
tree3fbbda6373ed2e7fc51dedddbe9aa58df60bb215 /BCT/BytecodeTranslator/TranslationHelper.cs
parentee0bf9f95487fd3b68ccdefb75f79d5026c6bfee (diff)
Removed the method DefaultValue from the sink: if a default value of a type
is desired, then the CCI nodes must be created and an expression/statement traverser used to translate it.
Diffstat (limited to 'BCT/BytecodeTranslator/TranslationHelper.cs')
-rw-r--r--BCT/BytecodeTranslator/TranslationHelper.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/BCT/BytecodeTranslator/TranslationHelper.cs b/BCT/BytecodeTranslator/TranslationHelper.cs
index 54ed1700..fde776f9 100644
--- a/BCT/BytecodeTranslator/TranslationHelper.cs
+++ b/BCT/BytecodeTranslator/TranslationHelper.cs
@@ -122,6 +122,10 @@ namespace BytecodeTranslator {
return s;
}
+ public static bool IsStruct(ITypeReference typ) {
+ return typ.IsValueType && !typ.IsEnum && typ.TypeCode == PrimitiveTypeCode.NotPrimitive;
+ }
+
#region Temp Stuff that must be replaced as soon as there is real code to deal with this
public static Bpl.Variable TempThisVar() {