Skip to content
Permalink
Browse files
Merge branch 'master' into truffle-head
  • Loading branch information
chrisseaton committed Nov 2, 2014
2 parents 119934c + 1495127 commit a15994c5cd39a0a614a0b29c7290a4c85b48a79e
Showing 10 changed files with 123 additions and 18 deletions.
@@ -44,7 +44,6 @@
jar 'org.jruby.joni:joni:2.1.3'
jar 'org.jruby.extras:bytelist:1.0.12-SNAPSHOT'
jar 'org.jruby.jcodings:jcodings:1.0.12-SNAPSHOT'
jar 'org.jruby:yecht:1.0'

jar 'com.headius:invokebinder:1.4-SNAPSHOT'
jar 'com.headius:options:1.1'
@@ -109,11 +109,6 @@
<artifactId>jcodings</artifactId>
<version>1.0.12-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.jruby</groupId>
<artifactId>yecht</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>com.headius</groupId>
<artifactId>invokebinder</artifactId>
@@ -1315,13 +1315,13 @@ private void initRoot() {
classClass = RubyClass.createBootstrapClass(this, "Class", moduleClass, RubyClass.CLASS_ALLOCATOR);

basicObjectClass.setMetaClass(classClass);
objectClass.setMetaClass(classClass);
objectClass.setMetaClass(basicObjectClass);
moduleClass.setMetaClass(classClass);
classClass.setMetaClass(classClass);

RubyClass metaClass;
metaClass = basicObjectClass.makeMetaClass(classClass);
metaClass = objectClass.makeMetaClass(classClass);
metaClass = objectClass.makeMetaClass(metaClass);
metaClass = moduleClass.makeMetaClass(metaClass);
metaClass = classClass.makeMetaClass(metaClass);

@@ -1737,7 +1737,7 @@ public List<IRubyObject> getAncestorList() {
ArrayList<IRubyObject> list = new ArrayList<IRubyObject>();

for (RubyModule module = this; module != null; module = module.getSuperClass()) {
if(!(module.isSingleton() || module.methodLocation != module)) list.add(module.getNonIncludedClass());
if (module.methodLocation == module) list.add(module.getNonIncludedClass());
}

return list;
@@ -252,8 +252,6 @@ private LocalContextProvider getProviderInstance(LocalContextScope scope, LocalV
}

private void initConfig() throws URISyntaxException, UnsupportedEncodingException {
List<String> paths = SystemPropertyCatcher.findLoadPaths();
provider.getRubyInstanceConfig().setLoadPaths(paths);
String home = SystemPropertyCatcher.findJRubyHome(this);
if (home != null) {
provider.getRubyInstanceConfig().setJRubyHome(home);
@@ -79,6 +79,7 @@ public enum CPU_TYPE {
X86_64,
POWERPC,
POWERPC64,
POWERPC64LE,
SPARC,
SPARCV9,
S390X,
@@ -134,6 +135,8 @@ private static final CPU_TYPE determineCPU() {
return CPU.POWERPC;
} else if ("ppc64".equals(archString)) {
return CPU.POWERPC64;
} else if ("ppc64le".equals(archString)) {
return CPU.POWERPC64LE;
} else if ("sparc".equals(archString)) {
return CPU.SPARC;
} else if ("sparcv9".equals(archString)) {
@@ -197,6 +200,7 @@ protected Platform(OS_TYPE os) {
break;
case X86_64:
case POWERPC64:
case POWERPC64LE:
case SPARCV9:
case S390X:
dataModel = 64;
@@ -1550,9 +1550,9 @@ public void testGetLoadPaths() {
instance.setOutput(pstream);
instance.setWriter(writer);
instance.setErrorWriter(writer);
List result = instance.getLoadPaths();
List<String> result = instance.getLoadPaths();
assertTrue(result != null);
assertTrue(result.size() > 0);
assertTrue(result.size() == 0);

instance = null;
}
@@ -2630,4 +2630,14 @@ public void testExitTerminatesScript() {
Object result = instance.runScriptlet("exit 1234");
assertEquals(1234L, result);
}

@Test
public void testLoadPathOfScriptingContainer() {
ScriptingContainer instance = new ScriptingContainer(LocalContextScope.SINGLETHREAD);
// note that instance.getLoadPath is not the load-path of the runtime !!!
String[] results = instance.runScriptlet("$LOAD_PATH").toString().split(", ");
for(String result : results){
assertTrue(result + " containt lib/ruby/", result.contains("lib/ruby/"));
}
}
}
@@ -0,0 +1,100 @@
rbx.platform.typedef.__u_char = uchar
rbx.platform.typedef.__u_short = ushort
rbx.platform.typedef.__u_int = uint
rbx.platform.typedef.__u_long = ulong
rbx.platform.typedef.__int8_t = char
rbx.platform.typedef.__uint8_t = uchar
rbx.platform.typedef.__int16_t = short
rbx.platform.typedef.__uint16_t = ushort
rbx.platform.typedef.__int32_t = int
rbx.platform.typedef.__uint32_t = uint
rbx.platform.typedef.__int64_t = long
rbx.platform.typedef.__uint64_t = ulong
rbx.platform.typedef.__quad_t = long
rbx.platform.typedef.__u_quad_t = ulong
rbx.platform.typedef.__dev_t = ulong
rbx.platform.typedef.__uid_t = uint
rbx.platform.typedef.__gid_t = uint
rbx.platform.typedef.__ino_t = ulong
rbx.platform.typedef.__ino64_t = ulong
rbx.platform.typedef.__mode_t = uint
rbx.platform.typedef.__nlink_t = ulong
rbx.platform.typedef.__off_t = long
rbx.platform.typedef.__off64_t = long
rbx.platform.typedef.__pid_t = int
rbx.platform.typedef.__clock_t = long
rbx.platform.typedef.__rlim_t = ulong
rbx.platform.typedef.__rlim64_t = ulong
rbx.platform.typedef.__id_t = uint
rbx.platform.typedef.__time_t = long
rbx.platform.typedef.__useconds_t = uint
rbx.platform.typedef.__suseconds_t = long
rbx.platform.typedef.__daddr_t = int
rbx.platform.typedef.__swblk_t = long
rbx.platform.typedef.__key_t = int
rbx.platform.typedef.__clockid_t = int
rbx.platform.typedef.__timer_t = pointer
rbx.platform.typedef.__blksize_t = long
rbx.platform.typedef.__blkcnt_t = long
rbx.platform.typedef.__blkcnt64_t = long
rbx.platform.typedef.__fsblkcnt_t = ulong
rbx.platform.typedef.__fsblkcnt64_t = ulong
rbx.platform.typedef.__fsfilcnt_t = ulong
rbx.platform.typedef.__fsfilcnt64_t = ulong
rbx.platform.typedef.__ssize_t = long
rbx.platform.typedef.__loff_t = long
rbx.platform.typedef.*__qaddr_t = long
rbx.platform.typedef.*__caddr_t = char
rbx.platform.typedef.__intptr_t = long
rbx.platform.typedef.__socklen_t = uint
rbx.platform.typedef.u_char = uchar
rbx.platform.typedef.u_short = ushort
rbx.platform.typedef.u_int = uint
rbx.platform.typedef.u_long = ulong
rbx.platform.typedef.quad_t = long
rbx.platform.typedef.u_quad_t = ulong
rbx.platform.typedef.loff_t = long
rbx.platform.typedef.ino_t = ulong
rbx.platform.typedef.dev_t = ulong
rbx.platform.typedef.gid_t = uint
rbx.platform.typedef.mode_t = uint
rbx.platform.typedef.nlink_t = ulong
rbx.platform.typedef.uid_t = uint
rbx.platform.typedef.off_t = long
rbx.platform.typedef.pid_t = int
rbx.platform.typedef.id_t = uint
rbx.platform.typedef.ssize_t = long
rbx.platform.typedef.daddr_t = int
rbx.platform.typedef.key_t = int
rbx.platform.typedef.time_t = long
rbx.platform.typedef.clockid_t = int
rbx.platform.typedef.timer_t = pointer
rbx.platform.typedef.size_t = ulong
rbx.platform.typedef.ulong = ulong
rbx.platform.typedef.ushort = ushort
rbx.platform.typedef.uint = uint
rbx.platform.typedef.int8_t = char
rbx.platform.typedef.int16_t = short
rbx.platform.typedef.int32_t = int
rbx.platform.typedef.int64_t = long
rbx.platform.typedef.u_int8_t = uchar
rbx.platform.typedef.u_int16_t = ushort
rbx.platform.typedef.u_int32_t = uint
rbx.platform.typedef.u_int64_t = ulong
rbx.platform.typedef.register_t = long
rbx.platform.typedef.__sig_atomic_t = int
rbx.platform.typedef.suseconds_t = long
rbx.platform.typedef.__fd_mask = long
rbx.platform.typedef.fd_mask = long
rbx.platform.typedef.blkcnt_t = long
rbx.platform.typedef.fsblkcnt_t = ulong
rbx.platform.typedef.fsfilcnt_t = ulong
rbx.platform.typedef.pthread_t = ulong
rbx.platform.typedef.pthread_key_t = uint
rbx.platform.typedef.pthread_once_t = int
rbx.platform.typedef.socklen_t = uint
rbx.platform.typedef.sa_family_t = ushort
rbx.platform.typedef.rlim_t = ulong
rbx.platform.typedef.__rlimit_resource_t = int
rbx.platform.typedef.__rusage_who_t = int
rbx.platform.typedef.__priority_which_t = int

This file was deleted.

@@ -252,7 +252,7 @@
</goals>
<configuration>
<target>
<exec failonerror="true" dir="${jruby.home}" executable="${jruby.home}/bin/jruby">
<exec dir="${jruby.home}" executable="${jruby.home}/bin/jruby" failonerror="true">
<arg value="-S" />
<arg value="rake" />
<arg value="${task}" />
@@ -280,7 +280,7 @@
</goals>
<configuration>
<target>
<exec failonerror="true" dir="${jruby.home}" executable="${jruby.home}/bin/jruby">
<exec dir="${jruby.home}" executable="${jruby.home}/bin/jruby" failonerror="true">
<arg value="-X+T" />
<arg value="-Xparser.warn.useless_use_of=false" />
<arg value="-Xparser.warn.not_reached=false" />
@@ -322,7 +322,7 @@
</goals>
<configuration>
<target>
<exec failonerror="true" dir="${jruby.home}" executable="${jruby.home}/bin/jruby">
<exec dir="${jruby.home}" executable="${jruby.home}/bin/jruby" failonerror="true">
<arg value="-X+T" />
<arg value="-Xparser.warn.useless_use_of=false" />
<arg value="-Xparser.warn.not_reached=false" />
@@ -364,7 +364,7 @@
</goals>
<configuration>
<target>
<exec failonerror="true" dir="${jruby.home}" executable="${jruby.home}/bin/jruby">
<exec dir="${jruby.home}" executable="${jruby.home}/bin/jruby" failonerror="true">
<arg value="-J-server" />
<arg value="-J-G:+TruffleCompilationExceptionsAreThrown" />
<arg value="-X+T" />

0 comments on commit a15994c

Please sign in to comment.