Skip to content

Commit

Permalink
Showing 4 changed files with 2 additions and 19 deletions.
1 change: 0 additions & 1 deletion core/pom.rb
Original file line number Diff line number Diff line change
@@ -59,7 +59,6 @@

jar 'com.headius:invokebinder:1.9'
jar 'com.headius:options:1.4'
jar 'com.headius:unsafe-fences:1.0'

jar 'bsf:bsf:2.4.0', :scope => 'provided'
jar 'com.jcraft:jzlib:1.1.3'
5 changes: 0 additions & 5 deletions core/pom.xml
Original file line number Diff line number Diff line change
@@ -200,11 +200,6 @@ DO NOT MODIFIY - GENERATED CODE
<artifactId>options</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>com.headius</groupId>
<artifactId>unsafe-fences</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>bsf</groupId>
<artifactId>bsf</artifactId>
Original file line number Diff line number Diff line change
@@ -26,7 +26,6 @@
***** END LICENSE BLOCK *****/
package org.jruby.runtime.ivars;

import com.headius.unsafe.fences.UnsafeFences;
import org.jruby.RubyBasicObject;
import org.jruby.RubyClass;
import org.jruby.util.ArraySupport;
@@ -152,13 +151,8 @@ private static boolean createTableUnsafe(RubyBasicObject self, int currentStamp,
*/
private static boolean updateTableUnsafe(RubyBasicObject self, int currentStamp, Object[] currentTable, int index, Object value) {
// shared access to varTable field.
if(UnsafeFences.SUPPORTS_FENCES) {
currentTable[index] = value;
UnsafeFences.fullFence();
} else {
// TODO: maybe optimize by read and checking current value before setting
UnsafeHolder.U.putObjectVolatile(currentTable, UnsafeHolder.ARRAY_OBJECT_BASE_OFFSET + UnsafeHolder.ARRAY_OBJECT_INDEX_SCALE * index, value);
}
currentTable[index] = value;
UnsafeHolder.U.fullFence();

// validate stamp. redo on concurrent modification
return self.varTableStamp == currentStamp;
5 changes: 0 additions & 5 deletions core/src/main/java/org/jruby/util/unsafe/UnsafeHolder.java
Original file line number Diff line number Diff line change
@@ -26,8 +26,6 @@
***** END LICENSE BLOCK *****/
package org.jruby.util.unsafe;

import com.headius.unsafe.fences.UnsafeFences;

import java.lang.reflect.Field;
import java.lang.reflect.Method;

@@ -90,7 +88,4 @@ public static long fieldOffset(Class clazz, String name) {
return sun.misc.Unsafe.INVALID_FIELD_OFFSET;
}
}

@Deprecated
public static final boolean SUPPORTS_FENCES = UnsafeFences.SUPPORTS_FENCES;
}

0 comments on commit 0fd3be0

Please sign in to comment.