Mercurial > hg > truffle
annotate graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/ReplacementsProvider.java @ 11959:23ccaa863eda
made CodeCacheProvider independent of MetaAccessProvider (GRAAL-511)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 10 Oct 2013 16:14:55 +0200 |
parents | cd2600a2336e |
children | 27a67adaf4f7 |
rev | line source |
---|---|
8458
5d0296347367
Use ServiceLoader to make installation of MethodSubstitutions extensible.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
1 /* |
5d0296347367
Use ServiceLoader to make installation of MethodSubstitutions extensible.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
2 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. |
5d0296347367
Use ServiceLoader to make installation of MethodSubstitutions extensible.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5d0296347367
Use ServiceLoader to make installation of MethodSubstitutions extensible.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
4 * |
5d0296347367
Use ServiceLoader to make installation of MethodSubstitutions extensible.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
5d0296347367
Use ServiceLoader to make installation of MethodSubstitutions extensible.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
5d0296347367
Use ServiceLoader to make installation of MethodSubstitutions extensible.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
5d0296347367
Use ServiceLoader to make installation of MethodSubstitutions extensible.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
8 * |
5d0296347367
Use ServiceLoader to make installation of MethodSubstitutions extensible.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
5d0296347367
Use ServiceLoader to make installation of MethodSubstitutions extensible.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
5d0296347367
Use ServiceLoader to make installation of MethodSubstitutions extensible.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
5d0296347367
Use ServiceLoader to make installation of MethodSubstitutions extensible.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
5d0296347367
Use ServiceLoader to make installation of MethodSubstitutions extensible.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
13 * accompanied this code). |
5d0296347367
Use ServiceLoader to make installation of MethodSubstitutions extensible.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
14 * |
5d0296347367
Use ServiceLoader to make installation of MethodSubstitutions extensible.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
5d0296347367
Use ServiceLoader to make installation of MethodSubstitutions extensible.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
5d0296347367
Use ServiceLoader to make installation of MethodSubstitutions extensible.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
5d0296347367
Use ServiceLoader to make installation of MethodSubstitutions extensible.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
18 * |
5d0296347367
Use ServiceLoader to make installation of MethodSubstitutions extensible.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
5d0296347367
Use ServiceLoader to make installation of MethodSubstitutions extensible.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
5d0296347367
Use ServiceLoader to make installation of MethodSubstitutions extensible.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
21 * questions. |
5d0296347367
Use ServiceLoader to make installation of MethodSubstitutions extensible.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
22 */ |
8645
15ae4fd89a75
moved ReplacementsProvider to com.oracle.graal.nodes.spi
Doug Simon <doug.simon@oracle.com>
parents:
8637
diff
changeset
|
23 package com.oracle.graal.nodes.spi; |
8627
75db7afee829
implemented lazy installation of replacements (GRAAL-137)
Doug Simon <doug.simon@oracle.com>
parents:
8458
diff
changeset
|
24 |
9187
cd2600a2336e
Store snippet templates in Replacements object.
Roland Schatz <roland.schatz@oracle.com>
parents:
8645
diff
changeset
|
25 import com.oracle.graal.api.code.*; |
cd2600a2336e
Store snippet templates in Replacements object.
Roland Schatz <roland.schatz@oracle.com>
parents:
8645
diff
changeset
|
26 import com.oracle.graal.api.meta.*; |
cd2600a2336e
Store snippet templates in Replacements object.
Roland Schatz <roland.schatz@oracle.com>
parents:
8645
diff
changeset
|
27 |
8458
5d0296347367
Use ServiceLoader to make installation of MethodSubstitutions extensible.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
28 /** |
8627
75db7afee829
implemented lazy installation of replacements (GRAAL-137)
Doug Simon <doug.simon@oracle.com>
parents:
8458
diff
changeset
|
29 * Interface for service providers that register replacements with the compiler. |
8458
5d0296347367
Use ServiceLoader to make installation of MethodSubstitutions extensible.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
30 */ |
5d0296347367
Use ServiceLoader to make installation of MethodSubstitutions extensible.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
31 public interface ReplacementsProvider { |
5d0296347367
Use ServiceLoader to make installation of MethodSubstitutions extensible.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
32 |
11959
23ccaa863eda
made CodeCacheProvider independent of MetaAccessProvider (GRAAL-511)
Doug Simon <doug.simon@oracle.com>
parents:
9187
diff
changeset
|
33 void registerReplacements(MetaAccessProvider metaAccess, Replacements replacements, TargetDescription target); |
8458
5d0296347367
Use ServiceLoader to make installation of MethodSubstitutions extensible.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
34 } |