Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/ReturnTypeSpecializationTest.java @ 12405:139b84d713bc
Truffle API adjustments: Simplify frame handling. Introduce cast for MaterializedFrame objects.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Mon, 14 Oct 2013 23:28:10 +0200 |
parents | df1d665ca846 |
children | ac5b0f31f7a2 |
comparison
equal
deleted
inserted
replaced
12404:47eb670c1634 | 12405:139b84d713bc |
---|---|
120 | 120 |
121 @Override | 121 @Override |
122 Object execute(VirtualFrame frame) { | 122 Object execute(VirtualFrame frame) { |
123 try { | 123 try { |
124 int result = value.executeInt(frame); | 124 int result = value.executeInt(frame); |
125 try { | 125 frame.setInt(slot, result); |
126 frame.setInt(slot, result); | |
127 } catch (FrameSlotTypeException e) { | |
128 frame.setObject(slot, result); | |
129 replace(new ObjectAssignLocal(slot, value)); | |
130 } | |
131 } catch (UnexpectedResultException e) { | 126 } catch (UnexpectedResultException e) { |
132 frame.setObject(slot, e.getResult()); | 127 frame.setObject(slot, e.getResult()); |
133 replace(new ObjectAssignLocal(slot, value)); | 128 replace(new ObjectAssignLocal(slot, value)); |
134 } | 129 } |
135 return null; | 130 return null; |