Mercurial > hg > truffle
comparison truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/impl/DefaultVisualizer.java @ 22465:ff5c0b5677cd
Truffle/Instrumentation: make the language object visualizer more robust when given null.
author | Michael Van De Vanter <michael.van.de.vanter@oracle.com> |
---|---|
date | Wed, 18 Nov 2015 18:42:18 -0800 |
parents | dc83cc1f94f2 |
children |
comparison
equal
deleted
inserted
replaced
22464:73cf3aefeffe | 22465:ff5c0b5677cd |
---|---|
74 public String displayCallTargetName(CallTarget callTarget) { | 74 public String displayCallTargetName(CallTarget callTarget) { |
75 return callTarget.toString(); | 75 return callTarget.toString(); |
76 } | 76 } |
77 | 77 |
78 public String displayValue(Object value, int trim) { | 78 public String displayValue(Object value, int trim) { |
79 if (value == null) { | |
80 return "<empty>"; | |
81 } | |
79 return trim(value.toString(), trim); | 82 return trim(value.toString(), trim); |
80 } | 83 } |
81 | 84 |
82 public String displayIdentifier(FrameSlot slot) { | 85 public String displayIdentifier(FrameSlot slot) { |
83 return slot.getIdentifier().toString(); | 86 return slot.getIdentifier().toString(); |