Mercurial > hg > graal-compiler
changeset 9357:cc2149467eed
Merge.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Sat, 27 Apr 2013 00:58:41 +0200 |
parents | 86d981cd8e22 (current diff) 0fccad3ce40d (diff) |
children | f1ffa0639a2a |
files | |
diffstat | 2 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/CompilerDirectives.java Sat Apr 27 00:49:49 2013 +0200 +++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/CompilerDirectives.java Sat Apr 27 00:58:41 2013 +0200 @@ -117,4 +117,13 @@ @Target({ElementType.FIELD}) public @interface CompilationFinal { } + + /** + * Marks methods that are considered unsafe. Wrong usage of those methods can lead to unexpected + * behavior including a crash of the runtime. Therefore, special care should be taken. + */ + @Retention(RetentionPolicy.RUNTIME) + @Target({ElementType.METHOD}) + public @interface Unsafe { + } }
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/frame/Frame.java Sat Apr 27 00:49:49 2013 +0200 +++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/frame/Frame.java Sat Apr 27 00:58:41 2013 +0200 @@ -45,6 +45,7 @@ * @param clazz the known type of the arguments object as a compile time constant * @return the arguments used when calling this method */ + @CompilerDirectives.Unsafe <T extends Arguments> T getArguments(Class<T> clazz); /**