annotate graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotStampProvider.java @ 18481:f91e40c4bb47

Create separate stamps for Klass* and Method*, and make them hotspot specific.
author Roland Schatz <roland.schatz@oracle.com>
date Thu, 20 Nov 2014 15:23:46 +0100
parents 16e61bb57e90
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18479
16e61bb57e90 Introduce StampProvider to support different stamps for metadata on different VMs.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
1 /*
16e61bb57e90 Introduce StampProvider to support different stamps for metadata on different VMs.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
2 * Copyright (c) 2014, 2014, Oracle and/or its affiliates. All rights reserved.
16e61bb57e90 Introduce StampProvider to support different stamps for metadata on different VMs.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
16e61bb57e90 Introduce StampProvider to support different stamps for metadata on different VMs.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
4 *
16e61bb57e90 Introduce StampProvider to support different stamps for metadata on different VMs.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
16e61bb57e90 Introduce StampProvider to support different stamps for metadata on different VMs.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
16e61bb57e90 Introduce StampProvider to support different stamps for metadata on different VMs.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
7 * published by the Free Software Foundation.
16e61bb57e90 Introduce StampProvider to support different stamps for metadata on different VMs.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
8 *
16e61bb57e90 Introduce StampProvider to support different stamps for metadata on different VMs.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
16e61bb57e90 Introduce StampProvider to support different stamps for metadata on different VMs.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16e61bb57e90 Introduce StampProvider to support different stamps for metadata on different VMs.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16e61bb57e90 Introduce StampProvider to support different stamps for metadata on different VMs.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
16e61bb57e90 Introduce StampProvider to support different stamps for metadata on different VMs.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
13 * accompanied this code).
16e61bb57e90 Introduce StampProvider to support different stamps for metadata on different VMs.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
14 *
16e61bb57e90 Introduce StampProvider to support different stamps for metadata on different VMs.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
16e61bb57e90 Introduce StampProvider to support different stamps for metadata on different VMs.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
16e61bb57e90 Introduce StampProvider to support different stamps for metadata on different VMs.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
16e61bb57e90 Introduce StampProvider to support different stamps for metadata on different VMs.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
18 *
16e61bb57e90 Introduce StampProvider to support different stamps for metadata on different VMs.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
16e61bb57e90 Introduce StampProvider to support different stamps for metadata on different VMs.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
16e61bb57e90 Introduce StampProvider to support different stamps for metadata on different VMs.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
21 * questions.
16e61bb57e90 Introduce StampProvider to support different stamps for metadata on different VMs.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
22 */
16e61bb57e90 Introduce StampProvider to support different stamps for metadata on different VMs.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
23 package com.oracle.graal.hotspot.meta;
16e61bb57e90 Introduce StampProvider to support different stamps for metadata on different VMs.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
24
16e61bb57e90 Introduce StampProvider to support different stamps for metadata on different VMs.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
25 import com.oracle.graal.compiler.common.type.*;
18481
f91e40c4bb47 Create separate stamps for Klass* and Method*, and make them hotspot specific.
Roland Schatz <roland.schatz@oracle.com>
parents: 18479
diff changeset
26 import com.oracle.graal.hotspot.nodes.type.*;
18479
16e61bb57e90 Introduce StampProvider to support different stamps for metadata on different VMs.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
27 import com.oracle.graal.nodes.spi.*;
16e61bb57e90 Introduce StampProvider to support different stamps for metadata on different VMs.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
28
16e61bb57e90 Introduce StampProvider to support different stamps for metadata on different VMs.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
29 public class HotSpotStampProvider implements StampProvider {
16e61bb57e90 Introduce StampProvider to support different stamps for metadata on different VMs.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
30
16e61bb57e90 Introduce StampProvider to support different stamps for metadata on different VMs.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
31 public Stamp createHubStamp(ObjectStamp object) {
18481
f91e40c4bb47 Create separate stamps for Klass* and Method*, and make them hotspot specific.
Roland Schatz <roland.schatz@oracle.com>
parents: 18479
diff changeset
32 return KlassPointerStamp.klassNonNull();
18479
16e61bb57e90 Introduce StampProvider to support different stamps for metadata on different VMs.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
33 }
16e61bb57e90 Introduce StampProvider to support different stamps for metadata on different VMs.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
34
16e61bb57e90 Introduce StampProvider to support different stamps for metadata on different VMs.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
35 public Stamp createMethodStamp() {
18481
f91e40c4bb47 Create separate stamps for Klass* and Method*, and make them hotspot specific.
Roland Schatz <roland.schatz@oracle.com>
parents: 18479
diff changeset
36 return MethodPointerStamp.methodNonNull();
18479
16e61bb57e90 Introduce StampProvider to support different stamps for metadata on different VMs.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
37 }
16e61bb57e90 Introduce StampProvider to support different stamps for metadata on different VMs.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
38 }