File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed
com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -46,12 +46,14 @@ public final class RStringVector extends RVector<Object[]> implements RAbstractS
4646
4747 private static final Assumption noWrappedStrings = Truffle .getRuntime ().createAssumption ();
4848
49- private long nativeContentsAddr ;
5049 private Object [] data ;
5150
5251 RStringVector (Object [] data , boolean complete ) {
5352 super (complete );
5453 assert data instanceof String [] || data instanceof CharSXPWrapper [];
54+ if (noWrappedStrings .isValid () && data instanceof CharSXPWrapper []) {
55+ noWrappedStrings .invalidate ();
56+ }
5557 this .data = data ;
5658 assert RAbstractVector .verify (this );
5759 }
Original file line number Diff line number Diff line change @@ -791,13 +791,7 @@ public final String toString() {
791791 }
792792
793793 protected boolean canBeValidStore (Object store , Object data ) {
794- RContext ctx ;
795- try {
796- ctx = RContext .getInstance ();
797- } catch (IllegalStateException ex ) {
798- return true ; // no context, we cannot check anything
799- }
800794 // We can be only sure if there is only one thread
801- return !ctx .isSingle () || store == data ;
795+ return !RContext .isSingle () || store == data ;
802796 }
803797}
You can’t perform that action at this time.
0 commit comments