summaryrefslogtreecommitdiff
path: root/BCT/BytecodeTranslator/HeapFactory.cs
diff options
context:
space:
mode:
Diffstat (limited to 'BCT/BytecodeTranslator/HeapFactory.cs')
-rw-r--r--BCT/BytecodeTranslator/HeapFactory.cs13
1 files changed, 13 insertions, 0 deletions
diff --git a/BCT/BytecodeTranslator/HeapFactory.cs b/BCT/BytecodeTranslator/HeapFactory.cs
index d35d12b3..fd1f312e 100644
--- a/BCT/BytecodeTranslator/HeapFactory.cs
+++ b/BCT/BytecodeTranslator/HeapFactory.cs
@@ -31,6 +31,13 @@ namespace BytecodeTranslator {
Bpl.Variable CreateFieldVariable(IFieldReference field);
/// <summary>
+ /// Creates a fresh BPL variable to represent <paramref name="type"/>, deciding
+ /// on its type based on the heap representation. I.e., the value of this
+ /// variable represents the value of the expression "typeof(type)".
+ /// </summary>
+ Bpl.Variable CreateTypeVariable(ITypeReference type);
+
+ /// <summary>
/// Returns the (typed) BPL expression that corresponds to the value of the field
/// <paramref name="f"/> belonging to the object <paramref name="o"/> (when
/// <paramref name="o"/> is non-null, otherwise the value of the static field.
@@ -51,6 +58,12 @@ namespace BytecodeTranslator {
/// </summary>
Bpl.Cmd WriteHeap(Bpl.IToken tok, Bpl.Expr/*?*/ o, Bpl.IdentifierExpr f, Bpl.Expr value);
+ /// <summary>
+ /// Returns the BPL expression that corresponds to the value of the dynamic type
+ /// of the object represented by the expression <paramref name="o"/>.
+ /// </summary>
+ Bpl.Expr DynamicType(Bpl.Expr o);
+
}
public abstract class HeapFactory {