annotate graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/AbstractStateSplit.java @ 6521:2a0c9f20baa1

consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
author Doug Simon <doug.simon@oracle.com>
date Fri, 05 Oct 2012 17:55:12 +0200
parents 3035b6b881d9
children feb579677b58
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5375
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
1 /*
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
2 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
4 *
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
7 * published by the Free Software Foundation.
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
8 *
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
13 * accompanied this code).
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
14 *
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
18 *
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
21 * questions.
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
22 */
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
23 package com.oracle.graal.nodes;
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
24
6521
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents: 5375
diff changeset
25 import com.oracle.graal.api.code.*;
5375
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
26 import com.oracle.graal.nodes.type.*;
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
27
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
28 /**
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
29 * Provides an implementation of {@link StateSplit}.
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
30 */
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
31 public abstract class AbstractStateSplit extends FixedWithNextNode implements StateSplit {
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
32
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
33 @Input(notDataflow = true) private FrameState stateAfter;
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
34
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
35 public FrameState stateAfter() {
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
36 return stateAfter;
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
37 }
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
38
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
39 public void setStateAfter(FrameState x) {
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
40 assert x == null || x.isAlive() : "frame state must be in a graph";
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
41 updateUsages(stateAfter, x);
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
42 stateAfter = x;
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
43 }
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
44
6521
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents: 5375
diff changeset
45 public boolean hasSideEffect(CodeCacheProvider runtime) {
5375
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
46 return true;
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
47 }
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
48
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
49 public AbstractStateSplit(Stamp stamp) {
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
50 super(stamp);
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
51 }
3035b6b881d9 removed stateAfter field from FixedWithNextNode - now only StateSplit implementations have this field
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
52 }