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

thread safety in BinaryMapNode

parent f103f9a2
Branches
No related tags found
No related merge requests found
......@@ -167,10 +167,11 @@ public abstract class BinaryArithmeticNode extends RBuiltinNode {
public BinaryMapNode get(BinaryArithmetic arithmetic, RAbstractVector left, RAbstractVector right) {
CompilerAsserts.neverPartOfCompilation();
if (!cached.isSupported(left, right)) {
cached = cached.replace(createCached(arithmetic, left, right));
BinaryMapNode map = cached;
if (!map.isSupported(left, right)) {
cached = map = map.replace(createCached(arithmetic, left, right));
}
return cached;
return map;
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment