diff options
author | Michael Bien <[email protected]> | 2009-12-01 23:24:30 +0100 |
---|---|---|
committer | Michael Bien <[email protected]> | 2009-12-01 23:24:30 +0100 |
commit | b0758ce498793c5e130493d9a03d7632de152855 (patch) | |
tree | 2597fa7f1e10dea4ffebff383ec830988460361d /src/java/com/sun/gluegen/DebugEmitter.java | |
parent | 0a5bc7f5a379b52cf5fe6bb9ea22f59fdec1fff0 (diff) |
Code cleanup. Ported package com.sun.gluegen to java 5 language level.
Diffstat (limited to 'src/java/com/sun/gluegen/DebugEmitter.java')
-rw-r--r-- | src/java/com/sun/gluegen/DebugEmitter.java | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/java/com/sun/gluegen/DebugEmitter.java b/src/java/com/sun/gluegen/DebugEmitter.java index 34586a1..06fba30 100644 --- a/src/java/com/sun/gluegen/DebugEmitter.java +++ b/src/java/com/sun/gluegen/DebugEmitter.java @@ -46,6 +46,7 @@ import com.sun.gluegen.cgram.types.*; /** Debug emitter which prints the parsing results to standard output. */ public class DebugEmitter implements GlueEmitter { + public void readConfigurationFile(String filename) {} public void setMachineDescription(MachineDescription md32, @@ -54,10 +55,13 @@ public class DebugEmitter implements GlueEmitter { public void beginEmission(GlueEmitterControls controls) { System.out.println("----- BEGIN EMISSION OF GLUE CODE -----"); } + public void endEmission() { System.out.println("----- END EMISSION OF GLUE CODE -----"); } + public void beginDefines() {} + public void emitDefine(ConstantDefinition def, String optionalComment) { String name = def.getName(); String value = def.getValue(); @@ -68,18 +72,16 @@ public class DebugEmitter implements GlueEmitter { public void beginFunctions(TypeDictionary typedefDictionary, TypeDictionary structDictionary, - Map canonMap) { - Set keys = typedefDictionary.keySet(); - for (Iterator iter = keys.iterator(); iter.hasNext(); ) { - String key = (String) iter.next(); + Map<Type, Type> canonMap) { + Set<String> keys = typedefDictionary.keySet(); + for (String key: keys) { Type value = typedefDictionary.get(key); System.out.println("typedef " + value + " " + key + ";"); } } - public Iterator emitFunctions(List/*<FunctionSymbol>*/ originalCFunctions) - throws Exception { - for (Iterator iter = originalCFunctions.iterator(); iter.hasNext(); ) { - FunctionSymbol sym = (FunctionSymbol) iter.next(); + + public Iterator<FunctionSymbol> emitFunctions(List<FunctionSymbol> originalCFunctions) throws Exception { + for (FunctionSymbol sym : originalCFunctions) { emitSingleFunction(sym); } return originalCFunctions.iterator(); @@ -94,10 +96,9 @@ public class DebugEmitter implements GlueEmitter { public void layoutStruct(CompoundType t) throws Exception {} public void endStructLayout() throws Exception {} - public void beginStructs(TypeDictionary typedefDictionary, - TypeDictionary structDictionary, - Map canonMap) { + public void beginStructs(TypeDictionary typedefDictionary, TypeDictionary structDictionary, Map<Type, Type> canonMap) { } + public void emitStruct(CompoundType t, String alternateName) { String name = t.getName(); if (name == null && alternateName != null) { @@ -106,5 +107,6 @@ public class DebugEmitter implements GlueEmitter { System.out.println("Referenced type \"" + name + "\""); } + public void endStructs() {} } |