Permalink
Browse files

Merge branch 'master' into rubinius

Conflicts:
	src/org/jruby/ext/rubinius/RubiniusLibrary.java
  • Loading branch information...
2 parents 2e809d4 + c402564 commit 947564724f86515d3318fd97a51dc9bd49b902db @headius headius committed May 24, 2011
Showing with 1,192 additions and 327 deletions.
  1. +36 −0 bench/bench_avi_base64.rb
  2. +17 −0 bench/language/bench_case.rb
  3. +0 −80 build.xml
  4. +1 −1 default.build.properties
  5. +424 −0 lib/ruby/site_ruby/shared/rubinius/actor.rb
  6. +68 −0 lib/ruby/site_ruby/shared/rubinius/actor/filter.rb
  7. +1 −1 maven/jruby-complete/pom.xml
  8. +1 −1 maven/jruby-core/pom.xml
  9. +1 −1 maven/jruby-dist/pom.xml
  10. +3 −3 maven/jruby-rake-plugin/pom.xml
  11. +1 −1 maven/jruby-stdlib/pom.xml
  12. +1 −1 maven/jruby/pom.xml
  13. +1 −1 maven/pom.xml
  14. +1 −1 pom.xml
  15. BIN spec/regression/.JRUBY-5811_case_insensitive_loaded_features.rb.swp
  16. +56 −0 spec/regression/JRUBY-3194_autoload_thread_safety.rb
  17. +27 −0 spec/regression/JRUBY-5811_case_insensitive_loaded_features.rb
  18. +0 −2 spec/tags/1.8/ruby/core/string/scan_tags.txt
  19. +0 −1 spec/tags/1.9/ruby/core/string/gsub_tags.txt
  20. +0 −3 spec/tags/1.9/ruby/core/string/scan_tags.txt
  21. +0 −1 spec/tags/1.9/ruby/core/string/split_tags.txt
  22. +32 −2 src/org/jruby/Ruby.java
  23. +1 −1 src/org/jruby/RubyException.java
  24. +1 −1 src/org/jruby/RubyInstanceConfig.java
  25. +5 −3 src/org/jruby/RubyKernel.java
  26. +1 −1 src/org/jruby/RubyModule.java
  27. +7 −2 src/org/jruby/RubyString.java
  28. +3 −3 src/org/jruby/ast/Colon2ConstNode.java
  29. +3 −3 src/org/jruby/ast/Colon3Node.java
  30. +3 −3 src/org/jruby/ast/ConstNode.java
  31. +7 −6 src/org/jruby/ast/executable/RuntimeCache.java
  32. +1 −1 src/org/jruby/compiler/impl/BaseBodyCompiler.java
  33. +1 −2 src/org/jruby/compiler/impl/ChildScopedBodyCompiler.java
  34. +1 −2 src/org/jruby/compiler/impl/ClassBodyCompiler.java
  35. +25 −4 src/org/jruby/compiler/impl/InheritedCacheCompiler.java
  36. +46 −0 src/org/jruby/compiler/impl/InvokeDynamicCacheCompiler.java
  37. +23 −0 src/org/jruby/compiler/impl/InvokeDynamicInvocationCompiler.java
  38. +1 −2 src/org/jruby/compiler/impl/MethodBodyCompiler.java
  39. +1 −2 src/org/jruby/compiler/impl/RootScopedBodyCompiler.java
  40. +23 −6 src/org/jruby/compiler/impl/StandardASMCompiler.java
  41. +2 −3 src/org/jruby/embed/osgi/internal/OSGiBundlesSearcher.java
  42. +1 −1 src/org/jruby/embed/variable/Argv.java
  43. +1 −1 src/org/jruby/embed/variable/Constant.java
  44. +2 −1 src/org/jruby/ext/ffi/StructLayout.java
  45. +2 −1 src/org/jruby/ext/psych/PsychParser.java
  46. +4 −0 src/org/jruby/javasupport/util/RuntimeHelpers.java
  47. +4 −9 src/org/jruby/runtime/ThreadContext.java
  48. +75 −14 src/org/jruby/runtime/invokedynamic/InvokeDynamicSupport.java
  49. +114 −115 src/org/jruby/runtime/load/LoadService.java
  50. +42 −0 src/org/jruby/runtime/opto/Invalidator.java
  51. +44 −0 src/org/jruby/runtime/opto/ObjectIdentityInvalidator.java
  52. +46 −0 src/org/jruby/runtime/opto/SwitchPointInvalidator.java
  53. +7 −10 src/org/jruby/util/collections/StringArraySet.java
  54. +24 −30 src/org/jruby/util/io/SelectorPool.java
View
@@ -0,0 +1,36 @@
+require 'stringio'
+require 'base64'
+
+def read_varint(io)
+ value = index = 0
+ begin
+ byte = io.readbyte
+ value |= (byte & 0x7f) << (7 * index)
+ index += 1
+ end while (byte & 0x80).nonzero?
+ value
+end
+
+def decode_base64_protobuf(string)
+ values = []
+ io = StringIO.new(Base64.decode64(string))
+ until io.eof?
+ bits = read_varint(io)
+ values[(bits >> 3) - 1] =
+ case bits & 0x07
+ when 0; read_varint(io)
+ when 2; io.read(read_varint(io))
+ end
+ end
+ values
+end
+
+require 'benchmark'
+(ARGV[0] || 5).to_i.times do
+ puts Benchmark.measure {
+ line = 'CKeTAxCmmfRHGK6trLv1prbkEiCglsTnBDgBMAA='
+ 100_000.times do
+ decode_base64_protobuf(line.split[-1]).join("\t")
+ end
+ }
+end
@@ -64,6 +64,14 @@ def do_case_multi_char_symbol
case :jx; when :ax; when :bx; when :cx; when :dx; when :ex; when :fx; when :gx; when :hx; when :ix; when :jx; end
case :jx; when :ax; when :bx; when :cx; when :dx; when :ex; when :fx; when :gx; when :hx; when :ix; when :jx; end
end
+
+ def do_case_custom_object(obj)
+ case 1; when 10; when 9; when 8; when 7; when 6; when 5; when 4; when 3; when 2; when obj; end
+ case 1; when 10; when 9; when 8; when 7; when 6; when 5; when 4; when 3; when 2; when obj; end
+ case 1; when 10; when 9; when 8; when 7; when 6; when 5; when 4; when 3; when 2; when obj; end
+ case 1; when 10; when 9; when 8; when 7; when 6; when 5; when 4; when 3; when 2; when obj; end
+ case 1; when 10; when 9; when 8; when 7; when 6; when 5; when 4; when 3; when 2; when obj; end
+ end
end
def bench_case(bm)
@@ -132,6 +140,15 @@ def bench_case(bm)
a += 1
end
end
+
+ bm.report "1m x5 cases, 9 fixnum 1 custom" do
+ a = 0
+ obj = Object.new
+ while a < 1_000_000
+ bc.do_case_custom_object(obj)
+ a += 1
+ end
+ end
end
if $0 == __FILE__
View
@@ -845,14 +845,6 @@
description="Runs unit tests.">
</target>
- <target name="test-indy" depends="
- copy-test-files,
- install-gems,
- run-junit-indy-short,
- test-rake-targets"
- description="Runs unit tests.">
- </target>
-
<target name="test-extended" depends="
copy-test-files,
install-gems,
@@ -893,8 +885,6 @@
<target name="run-junit-compiled"><run-junit-1.8 compile.mode="JIT" jit.threshold="0"/></target>
<target name="run-junit-compiled-short"><run-junit-1.8-short compile.mode="JIT" jit.threshold="0"/></target>
<target name="run-junit-interpreted-short"><run-junit-1.8-short/></target>
- <target name="run-junit-indy-short"><run-junit-1.8-indy-short/></target>
- <!-- temporarily disabled during compiler work -->
<target name="run-junit-compiled-1.9"><run-junit-1.9 compile.mode="JIT" jit.threshold="0"/></target>
<target name="run-junit-reflected-compiled"><run-junit-1.8 compile.mode="JIT" jit.threshold="0" reflection="true"/></target>
<target name="run-junit-reflected-compiled-1.9"><run-junit-1.9 compile.mode="JIT" jit.threshold="0" reflection="true"/></target>
@@ -920,61 +910,6 @@
<pathelement location="${test.dir}"/>
</path>
- <macrodef name="run-junit-indy">
- <attribute name="jruby.version" default="ruby1_8"/>
- <attribute name="compile.mode" default="-X+O"/>
- <attribute name="jit.threshold" default="0"/>
- <attribute name="jit.maxsize" default="1000000000"/>
- <attribute name="jit.max" default="-1"/>
- <attribute name="objectspace.enabled" default="true"/>
- <attribute name="thread.pooling" default="false"/>
- <attribute name="reflection" default="false"/>
- <element name="junit-tests"/>
- <sequential>
- <echo message="compile=@{compile.mode}, jit.threshold=@{jit.threshold}, jit.maxsize=@{jit.maxsize}, jit.max=@{jit.max}, objectspace=@{objectspace.enabled} threadpool=@{thread.pooling} reflection=@{reflection} version=@{jruby.version}"/>
- <taskdef name="junit" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask" classpath="${build.lib.dir}/junit.jar"/>
-
- <junit jvm="${jruby.test.jvm}" fork="yes" forkMode="once" haltonfailure="true" dir="${basedir}" maxmemory="${jruby.test.memory}" showoutput="true" timeout="1800000">
- <classpath refid="test.class.path"/>
-
- <sysproperty key="jruby.compile.invokedynamic" value="true"/>
- <sysproperty key="java.awt.headless" value="true"/>
- <sysproperty key="jruby.home" value="${basedir}"/>
- <sysproperty key="jruby.lib" value="${lib.dir}"/>
- <sysproperty key="jruby.compile.mode" value="@{compile.mode}"/>
- <sysproperty key="jruby.jit.threshold" value="@{jit.threshold}"/>
- <sysproperty key="jruby.jit.maxsize" value="@{jit.maxsize}"/>
- <sysproperty key="jruby.jit.max" value="@{jit.max}"/>
- <sysproperty key="jruby.compat.version" value="@{jruby.version}"/>
- <sysproperty key="jruby.objectspace.enabled" value="@{objectspace.enabled}"/>
- <sysproperty key="jruby.thread.pool.enabled" value="@{thread.pooling}"/>
- <sysproperty key="jruby.reflection" value="@{reflection}"/>
- <sysproperty key="jruby.jit.logging.verbose" value="true"/>
- <sysproperty key="jruby.compile.lazyHandles" value="true"/>
-
- <!-- emma coverage tool properties -->
- <sysproperty key="emma.coverage.out.file" value="${test.results.dir}/coverage.emma" />
- <sysproperty key="emma.coverage.out.merge" value="true" />
- <sysproperty key="emma.verbosity.level" value="silent" />
-
- <syspropertyset refid="test.sysproperties"/>
-
- <!-- force client VM to improve test run times AND -->
- <!-- set a larger max permgen, since the tests load a lot of bytecode -->
- <jvmarg line="-ea ${java.opts} -client -XX:MaxPermSize=256M -XX:+UnlockExperimentalVMOptions -XX:+EnableMethodHandles -XX:+EnableInvokeDynamic"/>
-
- <formatter type="xml"/>
- <formatter type="brief" usefile="false" />
-
- <junit-tests/>
- </junit>
- <junitreport todir="${test.results.dir}">
- <fileset dir="${test.results.dir}" includes="TEST-*.xml"/>
- <report format="frames" todir="${html.test.results.dir}"/>
- </junitreport>
- </sequential>
- </macrodef>
-
<macrodef name="run-junit">
<attribute name="jruby.version" default="ruby1_8"/>
<attribute name="compile.mode" default="OFF"/>
@@ -1054,21 +989,6 @@
</macrodef>
<!-- runs junit tests for 1.8 functionality -->
- <macrodef name="run-junit-1.8-indy-short">
- <sequential>
- <run-junit-indy>
- <junit-tests>
- <test name="${test}" if="test"/>
- <test name="org.jruby.test.ScriptTestSuite" todir="${test.results.dir}" unless="test"/>
- <test name="org.jruby.test.JRubyTestSuite" todir="${test.results.dir}" unless="test"/>
- <test name="org.jruby.test.MRITestSuite" todir="${test.results.dir}" unless="test"/>
- <test name="org.jruby.test.MainTestSuite" todir="${test.results.dir}" unless="test"/>
- </junit-tests>
- </run-junit-indy>
- </sequential>
- </macrodef>
-
- <!-- runs junit tests for 1.8 functionality -->
<macrodef name="run-junit-1.8">
<attribute name="compile.mode" default="OFF"/>
<attribute name="jit.threshold" default="20"/>
View
@@ -70,7 +70,7 @@ version.ruby1_9.major=1.9
version.ruby1_9=1.9.2
version.ruby1_9.patchlevel=136
version.ruby1_9.revision=27758
-version.jruby=1.6.1
+version.jruby=1.7.0.dev
mspec.revision=6563955da20f93e6dcd5a35ec5828de75c6165eb
rubyspecs.revision=3bf5857d44f9a69092862fa100a0ee1d152e6117
joda.time.version=1.6.2
Oops, something went wrong.

0 comments on commit 9475647

Please sign in to comment.