Charles Oliver Nutter headius

View gist:8414655
1 2 3 4 5 6 7 8 9 10
diff -r 4830d661c4f9 src/share/classes/com/sun/tools/javac/parser/JavaTokenizer.java
--- a/src/share/classes/com/sun/tools/javac/parser/JavaTokenizer.java Thu May 23 10:47:57 2013 -0700
+++ b/src/share/classes/com/sun/tools/javac/parser/JavaTokenizer.java Tue Jan 14 01:46:41 2014 -0600
@@ -637,7 +637,7 @@
break loop;
case '\"':
reader.scanChar();
- while (reader.ch != '\"' && reader.ch != CR && reader.ch != LF && reader.bp < reader.buflen)
+ while (reader.ch != '\"' && reader.bp < reader.buflen)
scanLitChar(pos);
View 1. results
1 2 3 4 5 6 7 8 9 10
BEFORE interpreted:
user system total real
control, 1 and :to_ary 0.070000 0.000000 0.070000 ( 0.068000)
1m 1.respond_to?(:to_ary) 0.130000 0.000000 0.130000 ( 0.126000)
1m 1.respond_to?(:to_ary,true) 0.120000 0.000000 0.120000 ( 0.122000)
1m 1.respond_to?(:next) 0.100000 0.000000 0.100000 ( 0.093000)
1m redefined obj.respond_to? 0.130000 0.000000 0.130000 ( 0.135000)
1m varying name respond_to? 0.280000 0.010000 0.290000 ( 0.272000)
 
BEFORE compiled:
View gist:8360925
1 2 3 4 5 6 7 8 9 10
diff --git a/core/src/main/java/org/jruby/internal/runtime/methods/MethodNodes.java b/core/src/main/java/org/jruby/internal/runtime/methods/MethodNodes.java
index b3af109..3d6c358 100644
--- a/core/src/main/java/org/jruby/internal/runtime/methods/MethodNodes.java
+++ b/core/src/main/java/org/jruby/internal/runtime/methods/MethodNodes.java
@@ -19,6 +19,7 @@ public class MethodNodes {
public MethodNodes(ArgsNode argsNode, Node bodyNode) {
assert argsNode != null;
+ assert bodyNode != null;
View gist:8339894
1 2 3 4 5 6 7 8 9 10
diff --git a/lib/ruby/shared/rubygems/installer.rb b/lib/ruby/shared/rubygems/installer.rb
index 33d2f78..07961d3 100644
--- a/lib/ruby/shared/rubygems/installer.rb
+++ b/lib/ruby/shared/rubygems/installer.rb
@@ -226,6 +226,7 @@ class Gem::Installer
if @options[:install_as_default]
extract_bin
write_default_spec
+ write_cache_file
else
View 1. results
1 2 3 4 5 6 7 8 9 10
# interpreted AST
 
system ~/projects/jruby $ jruby.bash -X-C mandelbrot.rb 20
warming up
running mandelbrot(500) for 20 iterations
4.862
4.822
4.822
4.846
5.057
View gist:8308530
1 2 3 4 5 6 7
system ~/projects/tarcieri/http $ jruby -G -S rake
/Users/headius/projects/jruby/bin/jruby -S rspec ./spec/http/options/body_spec.rb ./spec/http/options/callbacks_spec.rb ./spec/http/options/form_spec.rb ./spec/http/options/headers_spec.rb ./spec/http/options/merge_spec.rb ./spec/http/options/new_spec.rb ./spec/http/options/proxy_spec.rb ./spec/http/options/response_spec.rb ./spec/http/options_spec.rb ./spec/http/request_spec.rb ./spec/http/request_stream_spec.rb ./spec/http/response_spec.rb ./spec/http_spec.rb
/Users/headius/projects/jruby/lib/ruby/gems/shared/gems/simplecov-html-0.8.0/lib/simplecov-html.rb:58 warning: Useless use of a variable in void context.
/Users/headius/projects/jruby/lib/ruby/shared/krypt/hmac.rb:54 warning: shadowing outer local variable - new_key
/Users/headius/projects/jruby/lib/ruby/shared/krypt/codec/hex.rb:65 warning: shadowing outer local variable - data
/Users/headius/projects/jruby/lib/ruby/shared/krypt/codec/hex.rb:112 warning: shadowing outer local variable - data
/Users/he
View test.rb
1 2 3 4 5 6 7 8 9 10
module Atomically
GLOBAL_MUTEX = Mutex.new
def atomically(varname, &block)
# check first to avoid locking if possible
instance_variable_get(varname) || ___atomically_update___(varname, &block)
end
def ___atomically_update___(varname)
# lock and do ||= update
___mutex___.synchronize do
View hash_benchmark.rb
1 2 3 4 5 6 7 8 9 10
require 'benchmark'
class Request
def initialize(first, last, city, state, country)
@hash =
{
'first'.freeze => first,
'last'.freeze => last,
'city'.freeze => city,
'state'.freeze => state,
View gist:8106347
1 2 3 4 5 6 7 8 9 10
system ~/projects/jruby/testapp $ ls -l
total 48
-rw-rw-rw- 1 headius staff 1123 Dec 23 16:52 Gemfile
-rw-rw-rw- 1 headius staff 3051 Dec 23 16:52 Gemfile.lock
-rw-rw-rw- 1 headius staff 478 Dec 23 16:52 README.rdoc
-rw-rw-rw- 1 headius staff 252 Dec 23 16:52 Rakefile
drwxrwxrwx 8 headius staff 272 Dec 23 16:52 app
drwxr-xr-x 2 headius staff 170 Dec 23 16:52 bin
drwxrwxrwx 5 headius staff 340 Dec 23 16:52 config
-rw-rw-rw- 1 headius staff 154 Dec 23 16:52 config.ru
View gist:7665198
1 2 3 4 5 6 7
system ~/projects/ruby $ ruby2.1 -e "def foo; bar &->{return}; puts :a; end; def bar; yield; puts :b; end; foo; puts :c"
b
a
c
 
system ~/projects/ruby $ ruby2.0.0 -e "def foo; bar &->{return}; puts :a; end; def bar; yield; puts :b; end; foo; puts :c"
c
Something went wrong with that request. Please try again.