From 0dc73d1cbcf95f2b34b133bb7a0284584526fa6a Mon Sep 17 00:00:00 2001 From: bdemsky Date: Sun, 3 Apr 2011 03:56:14 +0000 Subject: [PATCH] changes for correctness --- Robust/src/IR/Flat/BuildCode.java | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/Robust/src/IR/Flat/BuildCode.java b/Robust/src/IR/Flat/BuildCode.java index f5e99038..efdcc0b3 100644 --- a/Robust/src/IR/Flat/BuildCode.java +++ b/Robust/src/IR/Flat/BuildCode.java @@ -2899,14 +2899,25 @@ public class BuildCode { output.println(generateTemp(fm,fcn.getDst())+"=("+fcn.getType().getSafeSymbol()+")"+generateTemp(fm,fcn.getSrc())+";"); } + int flncount=0; + protected void generateFlatLiteralNode(FlatMethod fm, FlatLiteralNode fln, PrintWriter output) { if (fln.getValue()==null) output.println(generateTemp(fm, fln.getDst())+"=0;"); else if (fln.getType().getSymbol().equals(TypeUtil.StringClass)) { + String str=(String)fln.getValue(); + output.print("short str"+flncount+"[]={"); + for(int i=0;i