Mercurial > hg > graal-compiler
annotate graal/com.oracle.truffle.api.dsl/src/com/oracle/truffle/api/dsl/ImportGuards.java @ 18726:8153d8cf264c
Added unit test for StampFactoryTest.createParameterStamps.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Fri, 19 Dec 2014 14:58:50 +0100 |
parents | 13cf9b6b325c |
children |
rev | line source |
---|---|
16832
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
1 /* |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
2 * Copyright (c) 2012, 2012, Oracle and/or its affiliates. All rights reserved. |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
4 * |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. Oracle designates this |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
8 * particular file as subject to the "Classpath" exception as provided |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
9 * by Oracle in the LICENSE file that accompanied this code. |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
10 * |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
11 * This code is distributed in the hope that it will be useful, but WITHOUT |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
14 * version 2 for more details (a copy is included in the LICENSE file that |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
15 * accompanied this code). |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
16 * |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
17 * You should have received a copy of the GNU General Public License version |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
18 * 2 along with this work; if not, write to the Free Software Foundation, |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
20 * |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
22 * or visit www.oracle.com if you need additional information or have any |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
23 * questions. |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
24 */ |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
25 package com.oracle.truffle.api.dsl; |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
26 |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
27 import java.lang.annotation.*; |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
28 |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
29 /** |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
30 * Imports all public static methods usable as guards for {@link Specialization} annotations to the |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
31 * current class. Using this annotation common guards can be shared across nodes. Imported guards |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
32 * are derived from super classes. Guards declared in the node type hierarchy are always preferred |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
33 * to imported guards. Imported guards for a more concrete type are preferred to guards imported in |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
34 * the base class. |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
35 */ |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
36 @Retention(RetentionPolicy.RUNTIME) |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
37 @Target({ElementType.TYPE}) |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
38 public @interface ImportGuards { |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
39 |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
40 Class<?>[] value(); |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
41 |
13cf9b6b325c
Truffle-DSL: implemented import guards feature.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
42 } |