From 3b7444349deb8c9b3e94de3f2a74d54a85635d68 Mon Sep 17 00:00:00 2001 From: bdemsky Date: Fri, 26 Jun 2009 01:08:18 +0000 Subject: [PATCH] fix inliner --- Robust/src/IR/Flat/Inliner.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Robust/src/IR/Flat/Inliner.java b/Robust/src/IR/Flat/Inliner.java index 780856b4..61a209ef 100644 --- a/Robust/src/IR/Flat/Inliner.java +++ b/Robust/src/IR/Flat/Inliner.java @@ -41,6 +41,9 @@ public class Inliner { //make depth 0 be depth infinity if (depth==0) depth=10000000; + if (atomicset.isEmpty()) + return; + System.out.println("Inlining methods into "+fm.getMethod()); recursive(state, typeutil, atomicset, depth, new Stack()); } @@ -67,7 +70,7 @@ public class Inliner { public static Set inline(FlatCall fc, TypeUtil typeutil, State state) { MethodDescriptor md=fc.getMethod(); if (md.getModifiers().isNative()) - return; + return null; /* Do we need to do virtual dispatch? */ if (md.isStatic()||md.getReturnType()==null||singleCall(typeutil, fc.getThis().getType().getClassDesc(),md)) { @@ -77,6 +80,7 @@ public class Inliner { TempDescriptor rettmp=fc.getReturnTemp(); FlatNode aftercallnode=fc.getNext(0); aftercallnode.removePrev(fc); + System.out.println("Inlining: "+md); FlatMethod fm=state.getMethodFlat(md); //Clone nodes -- 2.34.1