Mercurial > hg > graal-jvmci-8
annotate jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/EmptyEventProvider.java @ 24234:ea6f94ab283b default tip
Added tag jvmci-0.36 for changeset 8128b98d4736
author | Gilles Duboscq <gilles.m.duboscq@oracle.com> |
---|---|
date | Mon, 18 Sep 2017 18:49:45 +0200 |
parents | 5cf445d2acf6 |
children |
rev | line source |
---|---|
15663 | 1 /* |
2 * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. | |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | |
4 * | |
5 * This code is free software; you can redistribute it and/or modify it | |
6 * under the terms of the GNU General Public License version 2 only, as | |
7 * published by the Free Software Foundation. | |
8 * | |
9 * This code is distributed in the hope that it will be useful, but WITHOUT | |
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 * version 2 for more details (a copy is included in the LICENSE file that | |
13 * accompanied this code). | |
14 * | |
15 * You should have received a copy of the GNU General Public License version | |
16 * 2 along with this work; if not, write to the Free Software Foundation, | |
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 * | |
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | |
20 * or visit www.oracle.com if you need additional information or have any | |
21 * questions. | |
22 */ | |
23785
5cf445d2acf6
Exported elements referring to inaccessible types in jdk.vm.ci (JDK-8167180)
Doug Simon <doug.simon@oracle.com>
parents:
23364
diff
changeset
|
23 package jdk.vm.ci.hotspot; |
15663 | 24 |
25 /** | |
26 * An empty implementation for {@link EventProvider}. This implementation is used when no logging is | |
27 * requested. | |
28 */ | |
23785
5cf445d2acf6
Exported elements referring to inaccessible types in jdk.vm.ci (JDK-8167180)
Doug Simon <doug.simon@oracle.com>
parents:
23364
diff
changeset
|
29 final class EmptyEventProvider implements EventProvider { |
15663 | 30 |
23363
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
31 static InternalError shouldNotReachHere() { |
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
32 throw new InternalError("should not reach here"); |
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
33 } |
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
34 |
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
35 @Override |
15663 | 36 public CompilationEvent newCompilationEvent() { |
37 return new EmptyCompilationEvent(); | |
38 } | |
39 | |
23363
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
40 static class EmptyCompilationEvent implements CompilationEvent { |
15663 | 41 public void commit() { |
23363
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
42 throw shouldNotReachHere(); |
15663 | 43 } |
44 | |
45 public boolean shouldWrite() { | |
46 // Events of this class should never been written. | |
47 return false; | |
48 } | |
49 | |
50 public void begin() { | |
51 } | |
52 | |
53 public void end() { | |
54 } | |
55 | |
56 public void setMethod(String method) { | |
23363
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
57 throw shouldNotReachHere(); |
15663 | 58 } |
59 | |
60 public void setCompileId(int compileId) { | |
23363
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
61 throw shouldNotReachHere(); |
15663 | 62 } |
63 | |
64 public void setCompileLevel(int compileLevel) { | |
23363
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
65 throw shouldNotReachHere(); |
15663 | 66 } |
67 | |
68 public void setSucceeded(boolean succeeded) { | |
23363
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
69 throw shouldNotReachHere(); |
15663 | 70 } |
71 | |
72 public void setIsOsr(boolean isOsr) { | |
23363
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
73 throw shouldNotReachHere(); |
15663 | 74 } |
75 | |
76 public void setCodeSize(int codeSize) { | |
23363
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
77 throw shouldNotReachHere(); |
15663 | 78 } |
79 | |
80 public void setInlinedBytes(int inlinedBytes) { | |
23363
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
81 throw shouldNotReachHere(); |
15663 | 82 } |
83 } | |
84 | |
23363
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
85 @Override |
15663 | 86 public CompilerFailureEvent newCompilerFailureEvent() { |
87 return new EmptyCompilerFailureEvent(); | |
88 } | |
89 | |
23363
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
90 static class EmptyCompilerFailureEvent implements CompilerFailureEvent { |
15663 | 91 public void commit() { |
23363
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
92 throw shouldNotReachHere(); |
15663 | 93 } |
94 | |
95 public boolean shouldWrite() { | |
96 // Events of this class should never been written. | |
97 return false; | |
98 } | |
99 | |
100 public void setCompileId(int compileId) { | |
23363
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
101 throw shouldNotReachHere(); |
15663 | 102 } |
103 | |
104 public void setMessage(String message) { | |
23363
56479400913e
jdk.vm.ci needs to securely export services (JDK-8155023)
Doug Simon <doug.simon@oracle.com>
parents:
22672
diff
changeset
|
105 throw shouldNotReachHere(); |
15663 | 106 } |
107 } | |
108 | |
109 } |