Mercurial > hg > graal-compiler
annotate graal/com.oracle.truffle.api.dsl/src/com/oracle/truffle/api/dsl/internal/DSLMetadata.java @ 21629:36cf15e3219e
Move HotSpotResolvedJavaMethod.getSpeculationLog to ResolvedJavaMethod
author | Gilles Duboscq <gilles.m.duboscq@oracle.com> |
---|---|
date | Mon, 01 Jun 2015 15:14:39 +0200 |
parents | 90984ae0eaa8 |
children |
rev | line source |
---|---|
16766
90984ae0eaa8
Truffle-DSL: Fixed headers.
Christian Humer <christian.humer@gmail.com>
parents:
16763
diff
changeset
|
1 /* |
90984ae0eaa8
Truffle-DSL: Fixed headers.
Christian Humer <christian.humer@gmail.com>
parents:
16763
diff
changeset
|
2 * Copyright (c) 2012, 2012, Oracle and/or its affiliates. All rights reserved. |
90984ae0eaa8
Truffle-DSL: Fixed headers.
Christian Humer <christian.humer@gmail.com>
parents:
16763
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
90984ae0eaa8
Truffle-DSL: Fixed headers.
Christian Humer <christian.humer@gmail.com>
parents:
16763
diff
changeset
|
4 * |
90984ae0eaa8
Truffle-DSL: Fixed headers.
Christian Humer <christian.humer@gmail.com>
parents:
16763
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
90984ae0eaa8
Truffle-DSL: Fixed headers.
Christian Humer <christian.humer@gmail.com>
parents:
16763
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
90984ae0eaa8
Truffle-DSL: Fixed headers.
Christian Humer <christian.humer@gmail.com>
parents:
16763
diff
changeset
|
7 * published by the Free Software Foundation. Oracle designates this |
90984ae0eaa8
Truffle-DSL: Fixed headers.
Christian Humer <christian.humer@gmail.com>
parents:
16763
diff
changeset
|
8 * particular file as subject to the "Classpath" exception as provided |
90984ae0eaa8
Truffle-DSL: Fixed headers.
Christian Humer <christian.humer@gmail.com>
parents:
16763
diff
changeset
|
9 * by Oracle in the LICENSE file that accompanied this code. |
90984ae0eaa8
Truffle-DSL: Fixed headers.
Christian Humer <christian.humer@gmail.com>
parents:
16763
diff
changeset
|
10 * |
90984ae0eaa8
Truffle-DSL: Fixed headers.
Christian Humer <christian.humer@gmail.com>
parents:
16763
diff
changeset
|
11 * This code is distributed in the hope that it will be useful, but WITHOUT |
90984ae0eaa8
Truffle-DSL: Fixed headers.
Christian Humer <christian.humer@gmail.com>
parents:
16763
diff
changeset
|
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
90984ae0eaa8
Truffle-DSL: Fixed headers.
Christian Humer <christian.humer@gmail.com>
parents:
16763
diff
changeset
|
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
90984ae0eaa8
Truffle-DSL: Fixed headers.
Christian Humer <christian.humer@gmail.com>
parents:
16763
diff
changeset
|
14 * version 2 for more details (a copy is included in the LICENSE file that |
90984ae0eaa8
Truffle-DSL: Fixed headers.
Christian Humer <christian.humer@gmail.com>
parents:
16763
diff
changeset
|
15 * accompanied this code). |
90984ae0eaa8
Truffle-DSL: Fixed headers.
Christian Humer <christian.humer@gmail.com>
parents:
16763
diff
changeset
|
16 * |
90984ae0eaa8
Truffle-DSL: Fixed headers.
Christian Humer <christian.humer@gmail.com>
parents:
16763
diff
changeset
|
17 * You should have received a copy of the GNU General Public License version |
90984ae0eaa8
Truffle-DSL: Fixed headers.
Christian Humer <christian.humer@gmail.com>
parents:
16763
diff
changeset
|
18 * 2 along with this work; if not, write to the Free Software Foundation, |
90984ae0eaa8
Truffle-DSL: Fixed headers.
Christian Humer <christian.humer@gmail.com>
parents:
16763
diff
changeset
|
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
90984ae0eaa8
Truffle-DSL: Fixed headers.
Christian Humer <christian.humer@gmail.com>
parents:
16763
diff
changeset
|
20 * |
90984ae0eaa8
Truffle-DSL: Fixed headers.
Christian Humer <christian.humer@gmail.com>
parents:
16763
diff
changeset
|
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
90984ae0eaa8
Truffle-DSL: Fixed headers.
Christian Humer <christian.humer@gmail.com>
parents:
16763
diff
changeset
|
22 * or visit www.oracle.com if you need additional information or have any |
90984ae0eaa8
Truffle-DSL: Fixed headers.
Christian Humer <christian.humer@gmail.com>
parents:
16763
diff
changeset
|
23 * questions. |
90984ae0eaa8
Truffle-DSL: Fixed headers.
Christian Humer <christian.humer@gmail.com>
parents:
16763
diff
changeset
|
24 */ |
16763
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
25 package com.oracle.truffle.api.dsl.internal; |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
26 |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
27 /** |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
28 * This is NOT public API. Do not use directly. This code may change without notice. |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
29 */ |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
30 public final class DSLMetadata { |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
31 |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
32 public static final Class<?>[] EMPTY_CLASS_ARRAY = new Class<?>[]{}; |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
33 public static final DSLMetadata NONE = new DSLMetadata(null, EMPTY_CLASS_ARRAY, EMPTY_CLASS_ARRAY, EMPTY_CLASS_ARRAY, 0, 0); |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
34 |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
35 private final Class<?> specializationClass; |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
36 private final Class<?>[] includes; |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
37 private final Class<?>[] excludedBy; |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
38 private final Class<?>[] specializedTypes; |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
39 |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
40 private final int costs; |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
41 private final int order; |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
42 |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
43 public DSLMetadata(Class<?> specializationClass, Class<?>[] includes, Class<?>[] excludes, Class<?>[] specializedTypes, int costs, int order) { |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
44 this.specializationClass = specializationClass; |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
45 this.includes = includes; |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
46 this.excludedBy = excludes; |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
47 this.specializedTypes = specializedTypes; |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
48 this.costs = costs; |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
49 this.order = order; |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
50 } |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
51 |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
52 public Class<?> getSpecializationClass() { |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
53 return specializationClass; |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
54 } |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
55 |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
56 public Class<?>[] getSpecializedTypes() { |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
57 return specializedTypes; |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
58 } |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
59 |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
60 Class<?>[] getIncludes() { |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
61 return includes; |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
62 } |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
63 |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
64 Class<?>[] getExcludedBy() { |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
65 return excludedBy; |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
66 } |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
67 |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
68 int getCosts() { |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
69 return costs; |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
70 } |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
71 |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
72 int getOrder() { |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
73 return order; |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
74 } |
e6d15134ca86
Truffle-DSL: fixed formatting problems.
Christian Humer <christian.humer@gmail.com>
parents:
16751
diff
changeset
|
75 } |