From 1e8a21a7e190bece31229fc282a76853e32ae72f Mon Sep 17 00:00:00 2001 From: "Emmanouil (Manos) Koukoutos" <emmanouil.koukoutos@epfl.ch> Date: Wed, 7 Jan 2015 16:44:04 +0100 Subject: [PATCH] Compile NoTree to null/simplestValue --- src/main/scala/leon/codegen/CodeGeneration.scala | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/scala/leon/codegen/CodeGeneration.scala b/src/main/scala/leon/codegen/CodeGeneration.scala index 309c676ff..44140ba7a 100644 --- a/src/main/scala/leon/codegen/CodeGeneration.scala +++ b/src/main/scala/leon/codegen/CodeGeneration.scala @@ -702,6 +702,12 @@ trait CodeGeneration { ch << Ldc(id) ch << InvokeStatic(GenericValuesClass, "get", "(I)Ljava/lang/Object;") + case NoTree( tp@(Int32Type | BooleanType | UnitType | CharType)) => + mkExpr(simplestValue(tp), ch) + + case NoTree(_) => + ch << ACONST_NULL + case This(ct) => ch << ALoad(0) // FIXME what if doInstrument etc -- GitLab