Mercurial > hg > truffle
annotate graal/com.oracle.jvmci.meta/src/com/oracle/jvmci/meta/SerializableConstant.java @ 21594:cc9e15bbbd3c
SSAMoveResolver: add support for non-virtual stack slots.
author | Josef Eisl <josef.eisl@jku.at> |
---|---|
date | Fri, 29 May 2015 12:08:54 +0200 |
parents | 48c1ebd24120 |
children |
rev | line source |
---|---|
18793
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
1 /* |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
2 * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
4 * |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
8 * |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
13 * accompanied this code). |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
14 * |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
18 * |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
21 * questions. |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
22 */ |
21556
48c1ebd24120
renamed com.oracle.graal.api[meta|code] modules to com.oracle.jvmci.[meta|code] (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
18793
diff
changeset
|
23 package com.oracle.jvmci.meta; |
18793
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
24 |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
25 import java.nio.*; |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
26 |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
27 /** |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
28 * Represents a compile-time constant that can be converted to a byte array. |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
29 */ |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
30 public interface SerializableConstant extends Constant { |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
31 |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
32 /** |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
33 * Return the size in bytes of the serialized representation of this constant. |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
34 */ |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
35 int getSerializedSize(); |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
36 |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
37 /** |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
38 * Serialize the constant into the ByteBuffer. There must be at least |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
39 * {@link #getSerializedSize()} bytes available capacity in the buffer. |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
40 */ |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
41 void serialize(ByteBuffer buffer); |
ef51dadd50f7
Generalize ReinterpretNode to deal with arbitrary non-pointer types.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff
changeset
|
42 } |