Skip to content
Snippets Groups Projects
Commit b7464ed4 authored by Lukas Stadler's avatar Lukas Stadler
Browse files

add TruffleBoundary in exists

parent dc152e9b
Branches
No related tags found
No related merge requests found
/*
* Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2015, 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
......@@ -24,6 +24,7 @@ package com.oracle.truffle.r.nodes.builtin.base;
import static com.oracle.truffle.r.runtime.RBuiltinKind.*;
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
import com.oracle.truffle.api.dsl.*;
import com.oracle.truffle.r.nodes.*;
import com.oracle.truffle.r.nodes.access.*;
......@@ -44,9 +45,10 @@ public abstract class Exists extends RBuiltinNode {
}
@Specialization
@TruffleBoundary
@SuppressWarnings("unused")
protected byte existsStringEnv(RAbstractStringVector nameVec, REnvironment env, String mode, byte inherits) {
final String name = nameVec.getDataAt(0);
String name = nameVec.getDataAt(0);
controlVisibility();
if (inherits == RRuntime.LOGICAL_FALSE) {
return RRuntime.asLogical(env.get(name) != null);
......@@ -58,5 +60,4 @@ public abstract class Exists extends RBuiltinNode {
}
return RRuntime.LOGICAL_FALSE;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment