Mercurial > hg > truffle
annotate graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/DynamicDeoptimizeNode.java @ 11959:23ccaa863eda
made CodeCacheProvider independent of MetaAccessProvider (GRAAL-511)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 10 Oct 2013 16:14:55 +0200 |
parents | 0e2cceed1caf |
children | 2d8a8980eda8 |
rev | line source |
---|---|
11836
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
1 /* |
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
2 * Copyright (c) 2013, 2013, Oracle and/or its affiliates. All rights reserved. |
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
4 * |
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
8 * |
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
13 * accompanied this code). |
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
14 * |
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
18 * |
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
21 * questions. |
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
22 */ |
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
23 package com.oracle.graal.nodes; |
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
24 |
11839
0e2cceed1caf
Temporarily move encodeDeoptActionAndReason to MetaAccessProvider
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
11836
diff
changeset
|
25 import com.oracle.graal.api.meta.*; |
11836
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
26 import com.oracle.graal.nodes.spi.*; |
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
27 |
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
28 public class DynamicDeoptimizeNode extends AbstractDeoptimizeNode implements LIRLowerable { |
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
29 @Input private ValueNode actionAndReason; |
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
30 |
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
31 public DynamicDeoptimizeNode(ValueNode actionAndReason) { |
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
32 this.actionAndReason = actionAndReason; |
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
33 } |
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
34 |
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
35 public ValueNode getActionAndReason() { |
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
36 return actionAndReason; |
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
37 } |
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
38 |
11839
0e2cceed1caf
Temporarily move encodeDeoptActionAndReason to MetaAccessProvider
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
11836
diff
changeset
|
39 @Override |
11959
23ccaa863eda
made CodeCacheProvider independent of MetaAccessProvider (GRAAL-511)
Doug Simon <doug.simon@oracle.com>
parents:
11839
diff
changeset
|
40 public ValueNode getActionAndReason(MetaAccessProvider metaAccess) { |
11839
0e2cceed1caf
Temporarily move encodeDeoptActionAndReason to MetaAccessProvider
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
11836
diff
changeset
|
41 return getActionAndReason(); |
0e2cceed1caf
Temporarily move encodeDeoptActionAndReason to MetaAccessProvider
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
11836
diff
changeset
|
42 } |
0e2cceed1caf
Temporarily move encodeDeoptActionAndReason to MetaAccessProvider
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
11836
diff
changeset
|
43 |
11836
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
44 public void generate(LIRGeneratorTool generator) { |
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
45 generator.emitDeoptimize(generator.operand(actionAndReason), this); |
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
46 } |
d72c314260dc
Add a DynamicDeoptimizeNode where the action and reason is a input node.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
47 } |