Skip to content
Snippets Groups Projects
Commit a5f16732 authored by Tomas Stupka's avatar Tomas Stupka
Browse files

no need for RContext to be a TruffleObject

parent 5fa6b4ac
No related branches found
No related tags found
No related merge requests found
/*
* Copyright (c) 2017, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.oracle.truffle.r.engine.interop;
import com.oracle.truffle.api.interop.CanResolve;
import com.oracle.truffle.api.interop.MessageResolution;
import com.oracle.truffle.api.interop.Resolve;
import com.oracle.truffle.api.interop.TruffleObject;
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.r.runtime.context.RContext;
@MessageResolution(receiverType = RContext.class)
public class RContextMR {
@Resolve(message = "KEY_INFO")
public abstract static class RContextKeyInfoNode extends Node {
protected Object access(@SuppressWarnings("unused") TruffleObject receiver, @SuppressWarnings("unused") Object identifier) {
return 0;
}
}
@CanResolve
public abstract static class IsRContext extends Node {
protected static boolean test(TruffleObject receiver) {
return receiver instanceof RContext;
}
}
}
......@@ -100,8 +100,6 @@ public final class RForeignAccessFactoryImpl implements RForeignAccessFactory {
return RRawMRForeign.ACCESS;
} else if (obj instanceof RConnection) {
return RConnectionMRForeign.ACCESS;
} else if (obj instanceof RContext) {
return RContextMRForeign.ACCESS;
} else if (obj instanceof RS4Object) {
return RS4ObjectMRForeign.ACCESS;
} else if (obj instanceof RPromise) {
......
......@@ -97,7 +97,6 @@ import com.oracle.truffle.r.runtime.data.LanguageClosureCache;
import com.oracle.truffle.r.runtime.data.RDataFactory;
import com.oracle.truffle.r.runtime.data.RFunction;
import com.oracle.truffle.r.runtime.data.RStringVector;
import com.oracle.truffle.r.runtime.data.RTruffleObject;
import com.oracle.truffle.r.runtime.env.REnvironment;
import com.oracle.truffle.r.runtime.ffi.DLL;
import com.oracle.truffle.r.runtime.ffi.RFFIContext;
......@@ -124,7 +123,7 @@ import com.oracle.truffle.r.runtime.rng.RRNG;
*
* Contexts can be destroyed
*/
public final class RContext implements RTruffleObject {
public final class RContext {
public static final int CONSOLE_WIDTH = 80;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment