comparison graal/com.oracle.truffle.api/src/com/oracle/truffle/api/frame/FrameDescriptor.java @ 16727:9d55732d0880

additional info field on FrameSlot nodes (for language-specific use)
author Lukas Stadler <lukas.stadler@oracle.com>
date Fri, 08 Aug 2014 15:54:39 +0200
parents da9b9b625818
children 94f16a759646
comparison
equal deleted inserted replaced
16726:734247341e6e 16727:9d55732d0880
51 identifierToSlotMap = new HashMap<>(); 51 identifierToSlotMap = new HashMap<>();
52 version = createVersion(); 52 version = createVersion();
53 } 53 }
54 54
55 public FrameSlot addFrameSlot(Object identifier) { 55 public FrameSlot addFrameSlot(Object identifier) {
56 return addFrameSlot(identifier, FrameSlotKind.Illegal); 56 return addFrameSlot(identifier, null, FrameSlotKind.Illegal);
57 } 57 }
58 58
59 public FrameSlot addFrameSlot(Object identifier, FrameSlotKind kind) { 59 public FrameSlot addFrameSlot(Object identifier, FrameSlotKind kind) {
60 return addFrameSlot(identifier, null, kind);
61 }
62
63 public FrameSlot addFrameSlot(Object identifier, Object info, FrameSlotKind kind) {
60 CompilerAsserts.neverPartOfCompilation("interpreter-only. includes hashmap operations."); 64 CompilerAsserts.neverPartOfCompilation("interpreter-only. includes hashmap operations.");
61 assert !identifierToSlotMap.containsKey(identifier); 65 assert !identifierToSlotMap.containsKey(identifier);
62 FrameSlot slot = new FrameSlot(this, identifier, slots.size(), kind); 66 FrameSlot slot = new FrameSlot(this, identifier, info, slots.size(), kind);
63 slots.add(slot); 67 slots.add(slot);
64 identifierToSlotMap.put(identifier, slot); 68 identifierToSlotMap.put(identifier, slot);
65 updateVersion(); 69 updateVersion();
66 invalidateNotInFrameAssumption(identifier); 70 invalidateNotInFrameAssumption(identifier);
67 return slot; 71 return slot;