Mercurial > hg > truffle
comparison graal/com.oracle.max.asmdis/src/com/sun/max/asm/gen/cisc/x86/X86TemplateCreator.java @ 4142:bc8527f3071c
Adjust code base to new level of warnings.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Sun, 18 Dec 2011 05:24:06 +0100 |
parents | e233f5660da4 |
children |
comparison
equal
deleted
inserted
replaced
4141:04d21be7a24f | 4142:bc8527f3071c |
---|---|
29 | 29 |
30 /** | 30 /** |
31 */ | 31 */ |
32 public abstract class X86TemplateCreator<Template_Type extends X86Template> { | 32 public abstract class X86TemplateCreator<Template_Type extends X86Template> { |
33 | 33 |
34 private final Assembly assembly; | |
35 private final WordWidth addressWidth; | 34 private final WordWidth addressWidth; |
36 private X86InstructionDescription instructionDescription; | 35 private X86InstructionDescription instructionDescription; |
37 private InstructionAssessment instructionAssessment; | 36 private InstructionAssessment instructionAssessment; |
38 private X86TemplateContext context; | 37 private X86TemplateContext context; |
39 private int serial = 1; | 38 private int serial = 1; |
40 | 39 |
41 protected X86TemplateCreator(Assembly assembly, WordWidth addressWidth) { | 40 protected X86TemplateCreator(WordWidth addressWidth) { |
42 this.assembly = assembly; | |
43 this.addressWidth = addressWidth; | 41 this.addressWidth = addressWidth; |
44 } | 42 } |
45 | 43 |
46 private final List<Template_Type> templates = new ArrayList<Template_Type>(); | 44 private final List<Template_Type> templates = new ArrayList<>(); |
47 | 45 |
48 public List<Template_Type> templates() { | 46 public List<Template_Type> templates() { |
49 return templates; | 47 return templates; |
50 } | 48 } |
51 | 49 |
52 private final Map<String, List<Template_Type>> internalNameToTemplates = new HashMap<String, List<Template_Type>>(); | 50 private final Map<String, List<Template_Type>> internalNameToTemplates = new HashMap<>(); |
53 | 51 |
54 private void addTemplate(Template_Type template) { | 52 private void addTemplate(Template_Type template) { |
55 templates.add(template); | 53 templates.add(template); |
56 List<Template_Type> t = internalNameToTemplates.get(template.internalName()); | 54 List<Template_Type> t = internalNameToTemplates.get(template.internalName()); |
57 if (t == null) { | 55 if (t == null) { |
58 t = new LinkedList<Template_Type>(); | 56 t = new LinkedList<>(); |
59 internalNameToTemplates.put(template.internalName(), t); | 57 internalNameToTemplates.put(template.internalName(), t); |
60 } | 58 } |
61 t.add(template); | 59 t.add(template); |
62 } | 60 } |
63 | 61 |