Mercurial > hg > truffle
comparison graal/com.oracle.truffle.api/src/com/oracle/truffle/api/frame/NativeFrame.java @ 7267:a4b84ba6dc2e
Introduction of the Truffle API for efficient implementation of dynamic languages on top of the Graal VM. New projects com.oracle.truffle.api for the API definition and com.oracle.truffle.api.test for API tests and documentation.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Tue, 18 Dec 2012 15:33:55 +0100 |
parents | |
children | 5e3d1a68664e |
comparison
equal
deleted
inserted
replaced
7259:494d99e07614 | 7267:a4b84ba6dc2e |
---|---|
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. | |
8 * | |
9 * This code is distributed in the hope that it will be useful, but WITHOUT | |
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 * version 2 for more details (a copy is included in the LICENSE file that | |
13 * accompanied this code). | |
14 * | |
15 * You should have received a copy of the GNU General Public License version | |
16 * 2 along with this work; if not, write to the Free Software Foundation, | |
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 * | |
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | |
20 * or visit www.oracle.com if you need additional information or have any | |
21 * questions. | |
22 */ | |
23 package com.oracle.truffle.api.frame; | |
24 | |
25 import com.oracle.truffle.api.*; | |
26 | |
27 /** | |
28 * Represents a native frame without any local variables. Instances of this type must not be stored in a field or cast | |
29 * to {@link java.lang.Object}. | |
30 */ | |
31 public class NativeFrame implements VirtualFrame, PackedFrame { | |
32 | |
33 private PackedFrame caller; | |
34 private Arguments arguments; | |
35 | |
36 public NativeFrame(PackedFrame caller, Arguments arguments) { | |
37 this.caller = caller; | |
38 this.arguments = arguments; | |
39 } | |
40 | |
41 @Override | |
42 public Arguments getArguments() { | |
43 return arguments; | |
44 } | |
45 | |
46 @Override | |
47 public Object getObject(FrameSlot slot) { | |
48 throw new UnsupportedOperationException("native frame"); | |
49 } | |
50 | |
51 @Override | |
52 public void setObject(FrameSlot slot, Object value) { | |
53 throw new UnsupportedOperationException("native frame"); | |
54 } | |
55 | |
56 @Override | |
57 public boolean getBoolean(FrameSlot slot) { | |
58 throw new UnsupportedOperationException("native frame"); | |
59 } | |
60 | |
61 @Override | |
62 public void setBoolean(FrameSlot slot, boolean value) { | |
63 throw new UnsupportedOperationException("native frame"); | |
64 } | |
65 | |
66 @Override | |
67 public int getInt(FrameSlot slot) { | |
68 throw new UnsupportedOperationException("native frame"); | |
69 } | |
70 | |
71 @Override | |
72 public void setInt(FrameSlot slot, int value) { | |
73 throw new UnsupportedOperationException("native frame"); | |
74 } | |
75 | |
76 @Override | |
77 public long getLong(FrameSlot slot) { | |
78 throw new UnsupportedOperationException("native frame"); | |
79 } | |
80 | |
81 @Override | |
82 public void setLong(FrameSlot slot, long value) { | |
83 throw new UnsupportedOperationException("native frame"); | |
84 } | |
85 | |
86 @Override | |
87 public float getFloat(FrameSlot slot) { | |
88 throw new UnsupportedOperationException("native frame"); | |
89 } | |
90 | |
91 @Override | |
92 public void setFloat(FrameSlot slot, float value) { | |
93 throw new UnsupportedOperationException("native frame"); | |
94 } | |
95 | |
96 @Override | |
97 public double getDouble(FrameSlot slot) { | |
98 throw new UnsupportedOperationException("native frame"); | |
99 } | |
100 | |
101 @Override | |
102 public void setDouble(FrameSlot slot, double value) { | |
103 throw new UnsupportedOperationException("native frame"); | |
104 } | |
105 | |
106 @Override | |
107 public PackedFrame pack() { | |
108 return this; | |
109 } | |
110 | |
111 @Override | |
112 public PackedFrame getCaller() { | |
113 return caller; | |
114 } | |
115 | |
116 @Override | |
117 public MaterializedFrame materialize() { | |
118 throw new UnsupportedOperationException("native frame"); | |
119 } | |
120 | |
121 @Override | |
122 public VirtualFrame unpack() { | |
123 return this; | |
124 } | |
125 | |
126 @Override | |
127 public void updateToLatestVersion() { | |
128 } | |
129 } |