Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/ReturnTypeSpecializationTest.java @ 11638:269e6794e1ec
Truffle: Frame restructuring.
author | Andreas Woess <andreas.woess@jku.at> |
---|---|
date | Sun, 15 Sep 2013 02:39:07 +0200 |
parents | cd1a1d92b3e3 |
children | df1d665ca846 |
comparison
equal
deleted
inserted
replaced
11637:126e20d36563 | 11638:269e6794e1ec |
---|---|
118 try { | 118 try { |
119 int result = value.executeInt(frame); | 119 int result = value.executeInt(frame); |
120 try { | 120 try { |
121 frame.setInt(slot, result); | 121 frame.setInt(slot, result); |
122 } catch (FrameSlotTypeException e) { | 122 } catch (FrameSlotTypeException e) { |
123 FrameUtil.setObjectSafe(frame, slot, result); | 123 frame.setObject(slot, result); |
124 replace(new ObjectAssignLocal(slot, value)); | 124 replace(new ObjectAssignLocal(slot, value)); |
125 } | 125 } |
126 } catch (UnexpectedResultException e) { | 126 } catch (UnexpectedResultException e) { |
127 FrameUtil.setObjectSafe(frame, slot, e.getResult()); | 127 frame.setObject(slot, e.getResult()); |
128 replace(new ObjectAssignLocal(slot, value)); | 128 replace(new ObjectAssignLocal(slot, value)); |
129 } | 129 } |
130 return null; | 130 return null; |
131 } | 131 } |
132 } | 132 } |
141 } | 141 } |
142 | 142 |
143 @Override | 143 @Override |
144 Object execute(VirtualFrame frame) { | 144 Object execute(VirtualFrame frame) { |
145 Object o = value.execute(frame); | 145 Object o = value.execute(frame); |
146 try { | 146 frame.setObject(slot, o); |
147 frame.setObject(slot, o); | |
148 } catch (FrameSlotTypeException e) { | |
149 FrameUtil.setObjectSafe(frame, slot, o); | |
150 } | |
151 return null; | 147 return null; |
152 } | 148 } |
153 } | 149 } |
154 | 150 |
155 class IntReadLocal extends FrameSlotNode { | 151 class IntReadLocal extends FrameSlotNode { |