annotate graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/HotSpotSubstitutions.java @ 21604:93f282187d90

moved JVMCI service API into separate com.oracle.jvmci.service module (JBS:GRAAL-53)
author Doug Simon <doug.simon@oracle.com>
date Fri, 29 May 2015 17:01:57 +0200
parents 48c1ebd24120
children 64475dbf6aec
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12576
847819feb98e moved registration of HotSpot method substitutions out of HotSpotLoweringProvider into separate HotSpotSubstitutions class
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
1 /*
847819feb98e moved registration of HotSpot method substitutions out of HotSpotLoweringProvider into separate HotSpotSubstitutions class
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
2 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
847819feb98e moved registration of HotSpot method substitutions out of HotSpotLoweringProvider into separate HotSpotSubstitutions class
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
847819feb98e moved registration of HotSpot method substitutions out of HotSpotLoweringProvider into separate HotSpotSubstitutions class
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
4 *
847819feb98e moved registration of HotSpot method substitutions out of HotSpotLoweringProvider into separate HotSpotSubstitutions class
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
847819feb98e moved registration of HotSpot method substitutions out of HotSpotLoweringProvider into separate HotSpotSubstitutions class
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
847819feb98e moved registration of HotSpot method substitutions out of HotSpotLoweringProvider into separate HotSpotSubstitutions class
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
7 * published by the Free Software Foundation.
847819feb98e moved registration of HotSpot method substitutions out of HotSpotLoweringProvider into separate HotSpotSubstitutions class
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
8 *
847819feb98e moved registration of HotSpot method substitutions out of HotSpotLoweringProvider into separate HotSpotSubstitutions class
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
847819feb98e moved registration of HotSpot method substitutions out of HotSpotLoweringProvider into separate HotSpotSubstitutions class
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
847819feb98e moved registration of HotSpot method substitutions out of HotSpotLoweringProvider into separate HotSpotSubstitutions class
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
847819feb98e moved registration of HotSpot method substitutions out of HotSpotLoweringProvider into separate HotSpotSubstitutions class
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
847819feb98e moved registration of HotSpot method substitutions out of HotSpotLoweringProvider into separate HotSpotSubstitutions class
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
13 * accompanied this code).
847819feb98e moved registration of HotSpot method substitutions out of HotSpotLoweringProvider into separate HotSpotSubstitutions class
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
14 *
847819feb98e moved registration of HotSpot method substitutions out of HotSpotLoweringProvider into separate HotSpotSubstitutions class
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
847819feb98e moved registration of HotSpot method substitutions out of HotSpotLoweringProvider into separate HotSpotSubstitutions class
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
847819feb98e moved registration of HotSpot method substitutions out of HotSpotLoweringProvider into separate HotSpotSubstitutions class
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
847819feb98e moved registration of HotSpot method substitutions out of HotSpotLoweringProvider into separate HotSpotSubstitutions class
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
18 *
847819feb98e moved registration of HotSpot method substitutions out of HotSpotLoweringProvider into separate HotSpotSubstitutions class
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
847819feb98e moved registration of HotSpot method substitutions out of HotSpotLoweringProvider into separate HotSpotSubstitutions class
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
847819feb98e moved registration of HotSpot method substitutions out of HotSpotLoweringProvider into separate HotSpotSubstitutions class
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
21 * questions.
847819feb98e moved registration of HotSpot method substitutions out of HotSpotLoweringProvider into separate HotSpotSubstitutions class
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
22 */
847819feb98e moved registration of HotSpot method substitutions out of HotSpotLoweringProvider into separate HotSpotSubstitutions class
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
23 package com.oracle.graal.hotspot.replacements;
847819feb98e moved registration of HotSpot method substitutions out of HotSpotLoweringProvider into separate HotSpotSubstitutions class
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
24
15942
5c73b162eec2 reduced execution time of ReplacementsImple.registerSubstitutions() by deferring parsing of substitution classes until the first request for a substitute method is received
Doug Simon <doug.simon@oracle.com>
parents: 15359
diff changeset
25 import sun.misc.*;
5c73b162eec2 reduced execution time of ReplacementsImple.registerSubstitutions() by deferring parsing of substitution classes until the first request for a substitute method is received
Doug Simon <doug.simon@oracle.com>
parents: 15359
diff changeset
26 import sun.reflect.*;
5c73b162eec2 reduced execution time of ReplacementsImple.registerSubstitutions() by deferring parsing of substitution classes until the first request for a substitute method is received
Doug Simon <doug.simon@oracle.com>
parents: 15359
diff changeset
27
15357
89db561851d1 Add SnippetReflectionProvider to ReplacementsProvider interface.
Roland Schatz <roland.schatz@oracle.com>
parents: 15018
diff changeset
28 import com.oracle.graal.api.replacements.*;
12576
847819feb98e moved registration of HotSpot method substitutions out of HotSpotLoweringProvider into separate HotSpotSubstitutions class
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
29 import com.oracle.graal.nodes.spi.*;
847819feb98e moved registration of HotSpot method substitutions out of HotSpotLoweringProvider into separate HotSpotSubstitutions class
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
30 import com.oracle.graal.replacements.*;
21604
93f282187d90 moved JVMCI service API into separate com.oracle.jvmci.service module (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21556
diff changeset
31 import com.oracle.jvmci.code.*;
21551
5324104ac4f3 moved com.oracle.graal.hotspot.jvmci classes to com.oracle.jvmci.hotspot module (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21538
diff changeset
32 import com.oracle.jvmci.hotspot.*;
21604
93f282187d90 moved JVMCI service API into separate com.oracle.jvmci.service module (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21556
diff changeset
33 import com.oracle.jvmci.meta.*;
93f282187d90 moved JVMCI service API into separate com.oracle.jvmci.service module (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21556
diff changeset
34 import com.oracle.jvmci.service.*;
12576
847819feb98e moved registration of HotSpot method substitutions out of HotSpotLoweringProvider into separate HotSpotSubstitutions class
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
35
847819feb98e moved registration of HotSpot method substitutions out of HotSpotLoweringProvider into separate HotSpotSubstitutions class
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
36 @ServiceProvider(ReplacementsProvider.class)
847819feb98e moved registration of HotSpot method substitutions out of HotSpotLoweringProvider into separate HotSpotSubstitutions class
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
37 public class HotSpotSubstitutions implements ReplacementsProvider {
847819feb98e moved registration of HotSpot method substitutions out of HotSpotLoweringProvider into separate HotSpotSubstitutions class
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
38
847819feb98e moved registration of HotSpot method substitutions out of HotSpotLoweringProvider into separate HotSpotSubstitutions class
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
39 @Override
15357
89db561851d1 Add SnippetReflectionProvider to ReplacementsProvider interface.
Roland Schatz <roland.schatz@oracle.com>
parents: 15018
diff changeset
40 public void registerReplacements(MetaAccessProvider metaAccess, LoweringProvider loweringProvider, SnippetReflectionProvider snippetReflection, Replacements replacements, TargetDescription target) {
15942
5c73b162eec2 reduced execution time of ReplacementsImple.registerSubstitutions() by deferring parsing of substitution classes until the first request for a substitute method is received
Doug Simon <doug.simon@oracle.com>
parents: 15359
diff changeset
41 replacements.registerSubstitutions(System.class, SystemSubstitutions.class);
5c73b162eec2 reduced execution time of ReplacementsImple.registerSubstitutions() by deferring parsing of substitution classes until the first request for a substitute method is received
Doug Simon <doug.simon@oracle.com>
parents: 15359
diff changeset
42 replacements.registerSubstitutions(Thread.class, ThreadSubstitutions.class);
5c73b162eec2 reduced execution time of ReplacementsImple.registerSubstitutions() by deferring parsing of substitution classes until the first request for a substitute method is received
Doug Simon <doug.simon@oracle.com>
parents: 15359
diff changeset
43 replacements.registerSubstitutions(Unsafe.class, UnsafeSubstitutions.class);
5c73b162eec2 reduced execution time of ReplacementsImple.registerSubstitutions() by deferring parsing of substitution classes until the first request for a substitute method is received
Doug Simon <doug.simon@oracle.com>
parents: 15359
diff changeset
44 replacements.registerSubstitutions(Reflection.class, ReflectionSubstitutions.class);
19058
60ba8c3b4d93 Add substitution for CompilerToVMImpl.getJavaMirror
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 18495
diff changeset
45 replacements.registerSubstitutions(CompilerToVMImpl.class, CompilerToVMImplSubstitutions.class);
12576
847819feb98e moved registration of HotSpot method substitutions out of HotSpotLoweringProvider into separate HotSpotSubstitutions class
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
46 }
847819feb98e moved registration of HotSpot method substitutions out of HotSpotLoweringProvider into separate HotSpotSubstitutions class
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
47 }