From 4ccac3b5b4a96679b3419b5560627d598b930ac8 Mon Sep 17 00:00:00 2001 From: jjenista Date: Fri, 13 May 2011 20:13:38 +0000 Subject: [PATCH] print out brackets for array count to show humans --- Robust/src/IR/Flat/FlatNew.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Robust/src/IR/Flat/FlatNew.java b/Robust/src/IR/Flat/FlatNew.java index 8b1a0bbb..c94684b1 100644 --- a/Robust/src/IR/Flat/FlatNew.java +++ b/Robust/src/IR/Flat/FlatNew.java @@ -65,8 +65,18 @@ public class FlatNew extends FlatNode { public String toString() { String str = "FlatNew_"+dst.toString()+"= NEW "+type.toString(); - if (size!=null) + + int numEmptyBrackets = type.getArrayCount(); + if( size != null ) { + --numEmptyBrackets; + } + for( int i = 0; i < numEmptyBrackets; ++i ) { + str += "[]"; + } + if( size != null ) { str += "["+size.toString()+"]"; + } + return str; } -- 2.34.1