Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultDirectCallNode.java @ 15093:5634b199c4da
Truffle: API-change: renamed CallNode to DirectCallNode and added IndirectCallNode.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 14 Apr 2014 20:32:25 +0200 |
parents | graal/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultCallNode.java@607e33885130 |
children | a3b0ecef8a15 |
comparison
equal
deleted
inserted
replaced
15092:c73ce0dd3583 | 15093:5634b199c4da |
---|---|
1 /* | |
2 * Copyright (c) 2012, 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. Oracle designates this | |
8 * particular file as subject to the "Classpath" exception as provided | |
9 * by Oracle in the LICENSE file that accompanied this code. | |
10 * | |
11 * This code is distributed in the hope that it will be useful, but WITHOUT | |
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
14 * version 2 for more details (a copy is included in the LICENSE file that | |
15 * accompanied this code). | |
16 * | |
17 * You should have received a copy of the GNU General Public License version | |
18 * 2 along with this work; if not, write to the Free Software Foundation, | |
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
20 * | |
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | |
22 * or visit www.oracle.com if you need additional information or have any | |
23 * questions. | |
24 */ | |
25 package com.oracle.truffle.api.impl; | |
26 | |
27 import com.oracle.truffle.api.*; | |
28 import com.oracle.truffle.api.frame.*; | |
29 import com.oracle.truffle.api.nodes.*; | |
30 | |
31 /** | |
32 * This is runtime specific API. Do not use in a guest language. | |
33 */ | |
34 public final class DefaultDirectCallNode extends DirectCallNode { | |
35 | |
36 private boolean inliningForced; | |
37 | |
38 public DefaultDirectCallNode(CallTarget target) { | |
39 super(target); | |
40 } | |
41 | |
42 @Override | |
43 public Object call(VirtualFrame frame, Object[] arguments) { | |
44 return getCurrentCallTarget().call(arguments); | |
45 } | |
46 | |
47 @Override | |
48 public void forceInlining() { | |
49 inliningForced = true; | |
50 } | |
51 | |
52 @Override | |
53 public boolean isInliningForced() { | |
54 return inliningForced; | |
55 } | |
56 | |
57 @Override | |
58 public CallTarget getSplitCallTarget() { | |
59 return null; | |
60 } | |
61 | |
62 @Override | |
63 public boolean split() { | |
64 return false; | |
65 } | |
66 | |
67 @Override | |
68 public boolean isInlined() { | |
69 return false; | |
70 } | |
71 | |
72 @Override | |
73 public boolean isSplittable() { | |
74 return false; | |
75 } | |
76 | |
77 @Override | |
78 public boolean isInlinable() { | |
79 return false; | |
80 } | |
81 | |
82 @Override | |
83 public String toString() { | |
84 return (getParent() != null ? getParent().toString() : super.toString()) + " call " + getCurrentCallTarget().toString(); | |
85 } | |
86 } |