Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultVirtualFrame.java @ 9330:e162d9e32830
Added a clazz parameter to Frame.getArguments in order to allow unsafe access to the arguments object (i.e., avoiding the null check and the type cast).
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Fri, 26 Apr 2013 17:15:10 +0200 |
parents | cd1a1d92b3e3 |
children | 5d91b0b67cba |
comparison
equal
deleted
inserted
replaced
9329:fa188fbfe3fe | 9330:e162d9e32830 |
---|---|
41 this.arguments = arguments; | 41 this.arguments = arguments; |
42 this.locals = new Object[descriptor.getSize()]; | 42 this.locals = new Object[descriptor.getSize()]; |
43 this.tags = new byte[descriptor.getSize()]; | 43 this.tags = new byte[descriptor.getSize()]; |
44 } | 44 } |
45 | 45 |
46 @Override | 46 @SuppressWarnings("unchecked") |
47 public Arguments getArguments() { | 47 @Override |
48 return arguments; | 48 public <T extends Arguments> T getArguments(Class<T> clazz) { |
49 return (T) arguments; | |
49 } | 50 } |
50 | 51 |
51 @Override | 52 @Override |
52 public PackedFrame getCaller() { | 53 public PackedFrame getCaller() { |
53 return caller; | 54 return caller; |