comparison graal/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultMaterializedFrame.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.impl;
24
25 import com.oracle.truffle.api.*;
26 import com.oracle.truffle.api.frame.*;
27
28 final class DefaultMaterializedFrame implements MaterializedFrame {
29 private final DefaultVirtualFrame wrapped;
30
31 protected DefaultMaterializedFrame(DefaultVirtualFrame wrapped) {
32 this.wrapped = wrapped;
33 }
34
35 @Override
36 public Arguments getArguments() {
37 return wrapped.getArguments();
38 }
39
40 @Override
41 public Object getObject(FrameSlot slot) {
42 return wrapped.getObject(slot);
43 }
44
45 @Override
46 public void setObject(FrameSlot slot, Object value) {
47 wrapped.setObject(slot, value);
48 }
49
50 @Override
51 public boolean getBoolean(FrameSlot slot) {
52 return wrapped.getBoolean(slot);
53 }
54
55 @Override
56 public void setBoolean(FrameSlot slot, boolean value) {
57 wrapped.setBoolean(slot, value);
58 }
59
60 @Override
61 public int getInt(FrameSlot slot) {
62 return wrapped.getInt(slot);
63 }
64
65 @Override
66 public void setInt(FrameSlot slot, int value) {
67 wrapped.setInt(slot, value);
68 }
69
70 @Override
71 public long getLong(FrameSlot slot) {
72 return wrapped.getLong(slot);
73 }
74
75 @Override
76 public void setLong(FrameSlot slot, long value) {
77 wrapped.setLong(slot, value);
78 }
79
80 @Override
81 public float getFloat(FrameSlot slot) {
82 return wrapped.getFloat(slot);
83 }
84
85 @Override
86 public void setFloat(FrameSlot slot, float value) {
87 wrapped.setFloat(slot, value);
88 }
89
90 @Override
91 public double getDouble(FrameSlot slot) {
92 return wrapped.getDouble(slot);
93 }
94
95 @Override
96 public void setDouble(FrameSlot slot, double value) {
97 wrapped.setDouble(slot, value);
98 }
99
100 @Override
101 public void updateToLatestVersion() {
102 wrapped.updateToLatestVersion();
103 }
104 }