From ee5b4a16ed51edddf5f6dfc821381047f04bbcaa Mon Sep 17 00:00:00 2001 From: Lukas Stadler <lukas.stadler@oracle.com> Date: Thu, 2 Oct 2014 10:37:17 +0200 Subject: [PATCH] @SlowPath in RVector --- .../src/com/oracle/truffle/r/runtime/data/RVector.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RVector.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RVector.java index db7b9d646f..16e2391d75 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RVector.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RVector.java @@ -24,6 +24,7 @@ package com.oracle.truffle.r.runtime.data; import java.util.*; +import com.oracle.truffle.api.CompilerDirectives.SlowPath; import com.oracle.truffle.api.source.*; import com.oracle.truffle.r.runtime.*; import com.oracle.truffle.r.runtime.data.RAttributes.RAttribute; @@ -102,6 +103,7 @@ public abstract class RVector extends RBounded implements RShareable, RAbstractV return names == null ? RNull.instance : names; } + @SlowPath public final int getElementIndexByName(String name) { if (getNames() == RNull.instance) { return -1; @@ -121,6 +123,7 @@ public abstract class RVector extends RBounded implements RShareable, RAbstractV * index. If there are no names, or none is found, or there are multiple inexact matches, return * -1. */ + @SlowPath public final int getElementIndexByNameInexact(String name) { if (getNames() == RNull.instance) { return -1; @@ -160,6 +163,7 @@ public abstract class RVector extends RBounded implements RShareable, RAbstractV attributes.put(attribute, value); } + @SlowPath public final void setAttr(String name, Object value) { if (attributes == null) { initAttributes(); @@ -557,6 +561,7 @@ public abstract class RVector extends RBounded implements RShareable, RAbstractV } } + @SlowPath public final void resetDimensions(int[] newDimensions) { // reset all attributes other than dimensions; this.dimensions = newDimensions; -- GitLab