jbarnette-johnson 1.0.0.200808062111 → 1.0.0.200811251942

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/MANIFEST CHANGED
@@ -1,3 +1,4 @@
1
+ .autotest
1
2
  CHANGELOG
2
3
  MANIFEST
3
4
  MINGW32.mk
@@ -70,6 +71,7 @@ lib/johnson/visitors/ecma_visitor.rb
70
71
  lib/johnson/visitors/enumerating_visitor.rb
71
72
  lib/johnson/visitors/sexp_visitor.rb
72
73
  lib/rails/init.rb
74
+ srcs/xmlparser-0.6.8.tar
73
75
  test/assets/index.html
74
76
  test/assets/jquery_test.html
75
77
  test/helper.rb
@@ -100,6 +102,7 @@ test/johnson/nodes/function_test.rb
100
102
  test/johnson/nodes/if_test.rb
101
103
  test/johnson/nodes/import_test.rb
102
104
  test/johnson/nodes/label_test.rb
105
+ test/johnson/nodes/let_test.rb
103
106
  test/johnson/nodes/object_literal_test.rb
104
107
  test/johnson/nodes/return_test.rb
105
108
  test/johnson/nodes/semi_test.rb
@@ -123,6 +126,7 @@ test/johnson/version_test.rb
123
126
  test/johnson/visitors/dot_visitor_test.rb
124
127
  test/johnson/visitors/enumerating_visitor_test.rb
125
128
  test/johnson_test.rb
129
+ test/jquery_units/simple.js
126
130
  test/jquery_units/test.js
127
131
  test/jquery_units/test_helper.js
128
132
  test/jquery_units/units/ajax.js
@@ -279,7 +283,6 @@ vendor/spidermonkey/js.c
279
283
  vendor/spidermonkey/js.mak
280
284
  vendor/spidermonkey/js.mdp
281
285
  vendor/spidermonkey/js.msg
282
- vendor/spidermonkey/js.pkg
283
286
  vendor/spidermonkey/js3240.rc
284
287
  vendor/spidermonkey/jsOS240.def
285
288
  vendor/spidermonkey/jsapi.c
data/Rakefile CHANGED
@@ -3,6 +3,8 @@ require "erb"
3
3
  require "./lib/hoe.rb"
4
4
  require "./lib/johnson/version.rb"
5
5
 
6
+ abort "Need Ruby version 1.8.6!" unless RUBY_VERSION == "1.8.6"
7
+
6
8
  # what sort of extension are we building?
7
9
  kind = Config::CONFIG["DLEXT"]
8
10
 
@@ -34,7 +36,7 @@ end
34
36
 
35
37
  namespace :gem do
36
38
  task :spec do
37
- File.open("johnson.gemspec", "w") do |f|
39
+ File.open("#{HOE.name}.gemspec", "w") do |f|
38
40
  f.puts(HOE.spec.to_ruby)
39
41
  end
40
42
  end
@@ -63,6 +65,17 @@ Rake::Task["test:todo"].prerequisites << :extensions
63
65
 
64
66
  Rake::Task[:check_manifest].prerequisites << GENERATED_NODE
65
67
 
68
+ task :install_expat do
69
+ Dir.chdir("./srcs") do
70
+ `tar -xf xmlparser-0.6.8.tar`
71
+ Dir.chdir("xmlparser") do
72
+ puts `#{Gem.ruby} extconf.rb`
73
+ puts `make`
74
+ puts `sudo make install`
75
+ end
76
+ end
77
+ end
78
+
66
79
  task :build => :extensions
67
80
  task :extension => :build
68
81
 
@@ -122,7 +135,11 @@ file "ext/spidermonkey/Makefile" =>
122
135
  [LIBJS, GENERATED_NODE, "ext/spidermonkey/extconf.rb"] do
123
136
 
124
137
  dirs = (CROSS ? [ENV["CROSSLIB"]] : []) + $:
125
- command = ["ruby"] + dirs.map{|dir| "-I#{File.expand_path dir}"} + ["extconf.rb"]
138
+ if defined?(RbConfig)
139
+ ruby_exec = File.join(RbConfig::CONFIG["bindir"], RbConfig::CONFIG["ruby_install_name"])
140
+ end
141
+ ruby_exec ||= "ruby"
142
+ command = [ruby_exec] + dirs.map{|dir| "-I#{File.expand_path dir}"} + ["extconf.rb"]
126
143
  Dir.chdir("ext/spidermonkey") { sh *command }
127
144
  end
128
145
 
@@ -157,3 +174,49 @@ file GENERATED_NODE => ["ext/spidermonkey/immutable_node.c.erb", "vendor/spiderm
157
174
  f.write template.result(binding)
158
175
  }
159
176
  end
177
+
178
+ def test_suite_cmdline
179
+ require 'find'
180
+ files = []
181
+ Find.find("test") do |f|
182
+ files << f if File.basename(f) =~ /.*test.*\.rb$/
183
+ end
184
+ cmdline = "ruby -w -I.:lib:ext:test -rtest/unit -e '%w[#{files.join(' ')}].each {|f| require f}'"
185
+ end
186
+
187
+ namespace :test do
188
+ # partial-loads-ok and undef-value-errors necessary to ignore
189
+ # spurious (and eminently ignorable) warnings from the ruby
190
+ # interpreter
191
+ VALGRIND_BASIC_OPTS = "--num-callers=50 --error-limit=no --partial-loads-ok=yes --undef-value-errors=no"
192
+
193
+ desc "run test suite under valgrind with basic ruby options"
194
+ task :valgrind => :build do
195
+ cmdline = "valgrind #{VALGRIND_BASIC_OPTS} #{test_suite_cmdline}"
196
+ puts cmdline
197
+ system cmdline
198
+ end
199
+
200
+ desc "run test suite under valgrind with memory-fill ruby options"
201
+ task :valgrind_mem => :build do
202
+ # fill malloced memory with "m" and freed memory with "f"
203
+ cmdline = "valgrind #{VALGRIND_BASIC_OPTS} --freelist-vol=100000000 --malloc-fill=6D --free-fill=66 #{test_suite_cmdline}"
204
+ puts cmdline
205
+ system cmdline
206
+ end
207
+
208
+ desc "run test suite under valgrind with memory-zero ruby options"
209
+ task :valgrind_mem0 => :build do
210
+ # fill malloced and freed memory with 0
211
+ cmdline = "valgrind #{VALGRIND_BASIC_OPTS} --freelist-vol=100000000 --malloc-fill=00 --free-fill=00 #{test_suite_cmdline}"
212
+ puts cmdline
213
+ system cmdline
214
+ end
215
+
216
+ desc "run test suite under gdb"
217
+ task :gdb => :build do
218
+ cmdline = "gdb --args #{test_suite_cmdline}"
219
+ puts cmdline
220
+ system cmdline
221
+ end
222
+ end
data/bin/johnson CHANGED
@@ -1,13 +1,9 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- begin
4
- require "johnson"
5
- rescue LoadError
6
- require "rubygems"
7
- require "johnson"
8
- end
3
+ $:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "..", "lib")))
9
4
 
10
5
  require "readline"
6
+ require "johnson"
11
7
 
12
8
  RUNTIME = js = Johnson::Runtime.new
13
9
  RUNTIME.evaluate(Johnson::CLI::JS)
@@ -63,12 +59,16 @@ options.files_to_preload.each { |f| RUNTIME.load(f) }
63
59
 
64
60
  unless options.expressions.empty?
65
61
  options.expressions.each { |e| RUNTIME.evaluate(e, '-e') }
66
- exit if !options.file_to_evaluate
62
+ exit if options.files_to_evaluate.empty?
67
63
  end
68
64
 
69
- if options.file_to_evaluate
65
+ unless options.files_to_evaluate.empty?
70
66
  RUNTIME[:arguments] = options.arguments
71
- RUNTIME.load(options.file_to_evaluate)
67
+
68
+ options.files_to_evaluate.each do |file|
69
+ RUNTIME.load(file)
70
+ end
71
+
72
72
  exit
73
73
  end
74
74
 
@@ -89,16 +89,10 @@ initialize_native(VALUE self, VALUE rb_runtime, VALUE UNUSED(options))
89
89
  //// INFRASTRUCTURE BELOW HERE ////////////////////////////////////////////
90
90
  ///////////////////////////////////////////////////////////////////////////
91
91
 
92
- static void deallocate(JohnsonContext *context) {
93
- JS_SetContextPrivate(context->js, 0);
94
- JS_DestroyContext(context->js);
95
- free(context);
96
- }
97
-
98
92
  static VALUE allocate(VALUE klass)
99
93
  {
100
94
  JohnsonContext* context = calloc(1L, sizeof(JohnsonContext));
101
- return Data_Wrap_Struct(klass, 0, deallocate, context);
95
+ return Data_Wrap_Struct(klass, 0, 0, context);
102
96
  }
103
97
 
104
98
  void init_Johnson_SpiderMonkey_Context(VALUE spidermonkey)
@@ -3,6 +3,12 @@
3
3
  #include "conversions.h"
4
4
  #include "immutable_node.h"
5
5
 
6
+ /*
7
+ * call-seq:
8
+ * frame_pc(context, frame)
9
+ *
10
+ * Get the frame parse context
11
+ */
6
12
  static VALUE frame_pc(VALUE UNUSED(self), VALUE context, VALUE frame)
7
13
  {
8
14
  JSContext * js = NULL;
@@ -12,6 +18,12 @@ static VALUE frame_pc(VALUE UNUSED(self), VALUE context, VALUE frame)
12
18
  return Data_Wrap_Struct(rb_cObject, NULL, NULL, JS_GetFramePC(js, fp));
13
19
  }
14
20
 
21
+ /*
22
+ * call-seq:
23
+ * line_number(context, script, bytecode)
24
+ *
25
+ * Get the line number of the +bytecode+ given +context+ and +script+
26
+ */
15
27
  static VALUE line_number(VALUE UNUSED(self), VALUE context, VALUE script, VALUE bytecode)
16
28
  {
17
29
  JSContext * js = NULL;
@@ -25,6 +37,12 @@ static VALUE line_number(VALUE UNUSED(self), VALUE context, VALUE script, VALUE
25
37
  return INT2NUM((long)JS_PCToLineNumber(js, js_script, js_bytecode));
26
38
  }
27
39
 
40
+ /*
41
+ * call-seq:
42
+ * file_name(context, script)
43
+ *
44
+ * Get the file name of the +script+ given +context+
45
+ */
28
46
  static VALUE file_name(VALUE UNUSED(self), VALUE context, VALUE script)
29
47
  {
30
48
  JSContext * js = NULL;
@@ -61,6 +61,7 @@ static VALUE parse_io(int argc, VALUE *argv, VALUE klass) {
61
61
  chars,
62
62
  length,
63
63
  NULL, filenamez, (unsigned)linenumi));
64
+ JS_SetVersion(context->js, JSVERSION_LATEST);
64
65
 
65
66
  context->node = js_ParseScript(context->js,
66
67
  JS_NewObject(context->js, NULL, NULL, NULL),
@@ -142,8 +142,12 @@ function_p(VALUE self)
142
142
  * Returns <code>true</code> if _obj_ responds to given method.
143
143
  */
144
144
  static VALUE
145
- respond_to_p(VALUE self, VALUE sym)
145
+ respond_to_p(int argc, const VALUE* argv, VALUE self)
146
146
  {
147
+ VALUE sym, priv;
148
+
149
+ rb_scan_args(argc, argv, "11", &sym, &priv);
150
+
147
151
  RubyLandProxy* proxy;
148
152
  Data_Get_Struct(self, RubyLandProxy, proxy);
149
153
 
@@ -169,7 +173,7 @@ respond_to_p(VALUE self, VALUE sym)
169
173
 
170
174
  JCHECK(JS_HasProperty(context, obj, name, &found));
171
175
 
172
- JRETURN_RUBY(found ? Qtrue : CALL_RUBY_WRAPPER(rb_call_super, 1, &sym));
176
+ JRETURN_RUBY(found ? Qtrue : CALL_RUBY_WRAPPER(rb_call_super, argc, argv));
173
177
  }
174
178
 
175
179
  /*
@@ -526,7 +530,7 @@ void init_Johnson_SpiderMonkey_Proxy(VALUE spidermonkey)
526
530
  rb_define_method(proxy_class, "[]", get, 1);
527
531
  rb_define_method(proxy_class, "[]=", set, 2);
528
532
  rb_define_method(proxy_class, "function?", function_p, 0);
529
- rb_define_method(proxy_class, "respond_to?", respond_to_p, 1);
533
+ rb_define_method(proxy_class, "respond_to?", respond_to_p, -1);
530
534
  rb_define_method(proxy_class, "each", each, 0);
531
535
  rb_define_method(proxy_class, "length", length, 0);
532
536
  rb_define_method(proxy_class, "to_s", to_s, 0);
@@ -272,11 +272,13 @@ static void deallocate(JohnsonRuntime* runtime)
272
272
  {
273
273
  JS_RemoveRoot(johnson_get_current_context(runtime), &(runtime->global));
274
274
 
275
- JSContext *context;
275
+ JSContext *context = NULL;
276
276
  JSContext *iterator = NULL;
277
277
 
278
- while ((context = JS_ContextIterator(runtime->js, &iterator)) != NULL)
279
- JS_DestroyContext(context);
278
+ while ((context = JS_ContextIterator(runtime->js, &iterator)) != NULL) {
279
+ JS_DestroyContext(iterator);
280
+ iterator = NULL;
281
+ }
280
282
 
281
283
  JS_DestroyRuntime(runtime->js);
282
284
  free(runtime);
data/johnson.gemspec CHANGED
@@ -1,31 +1,33 @@
1
+ # -*- encoding: utf-8 -*-
2
+
1
3
  Gem::Specification.new do |s|
2
4
  s.name = %q{johnson}
3
- s.version = "1.0.0.200808062111"
5
+ s.version = "1.0.0.200811251942"
4
6
 
5
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
6
8
  s.authors = ["John Barnette", "Aaron Patterson", "Yehuda Katz", "Matthew Draper"]
7
- s.date = %q{2008-08-06}
9
+ s.date = %q{2008-11-25}
8
10
  s.default_executable = %q{johnson}
9
11
  s.description = %q{Johnson wraps JavaScript in a loving Ruby embrace.}
10
12
  s.email = %q{johnson-talk@googlegroups.com}
11
13
  s.executables = ["johnson"]
12
14
  s.extensions = ["Rakefile"]
13
15
  s.extra_rdoc_files = ["README.rdoc", "cross-compile.txt"]
14
- s.files = ["CHANGELOG", "MANIFEST", "MINGW32.mk", "README.rdoc", "Rakefile", "bin/johnson", "cross-compile.txt", "ext/spidermonkey/context.c", "ext/spidermonkey/context.h", "ext/spidermonkey/conversions.c", "ext/spidermonkey/conversions.h", "ext/spidermonkey/debugger.c", "ext/spidermonkey/debugger.h", "ext/spidermonkey/extconf.rb", "ext/spidermonkey/extensions.c", "ext/spidermonkey/extensions.h", "ext/spidermonkey/global.c", "ext/spidermonkey/global.h", "ext/spidermonkey/idhash.c", "ext/spidermonkey/idhash.h", "ext/spidermonkey/immutable_node.c", "ext/spidermonkey/immutable_node.c.erb", "ext/spidermonkey/immutable_node.h", "ext/spidermonkey/jroot.h", "ext/spidermonkey/js_land_proxy.c", "ext/spidermonkey/js_land_proxy.h", "ext/spidermonkey/ruby_land_proxy.c", "ext/spidermonkey/ruby_land_proxy.h", "ext/spidermonkey/runtime.c", "ext/spidermonkey/runtime.h", "ext/spidermonkey/spidermonkey.c", "ext/spidermonkey/spidermonkey.h", "johnson.gemspec", "js/johnson/browser.js", "js/johnson/browser/env.js", "js/johnson/browser/jquery.js", "js/johnson/browser/xmlsax.js", "js/johnson/browser/xmlw3cdom.js", "js/johnson/cli.js", "js/johnson/prelude.js", "js/johnson/template.js", "lib/hoe.rb", "lib/johnson.rb", "lib/johnson/cli.rb", "lib/johnson/cli/options.rb", "lib/johnson/error.rb", "lib/johnson/nodes.rb", "lib/johnson/nodes/binary_node.rb", "lib/johnson/nodes/for.rb", "lib/johnson/nodes/for_in.rb", "lib/johnson/nodes/function.rb", "lib/johnson/nodes/list.rb", "lib/johnson/nodes/node.rb", "lib/johnson/nodes/ternary_node.rb", "lib/johnson/parser.rb", "lib/johnson/parser/syntax_error.rb", "lib/johnson/runtime.rb", "lib/johnson/spidermonkey/context.rb", "lib/johnson/spidermonkey/debugger.rb", "lib/johnson/spidermonkey/immutable_node.rb", "lib/johnson/spidermonkey/js_land_proxy.rb", "lib/johnson/spidermonkey/mutable_tree_visitor.rb", "lib/johnson/spidermonkey/ruby_land_proxy.rb", "lib/johnson/spidermonkey/runtime.rb", "lib/johnson/version.rb", "lib/johnson/visitable.rb", "lib/johnson/visitors.rb", "lib/johnson/visitors/dot_visitor.rb", "lib/johnson/visitors/ecma_visitor.rb", "lib/johnson/visitors/enumerating_visitor.rb", "lib/johnson/visitors/sexp_visitor.rb", "lib/rails/init.rb", "test/assets/index.html", "test/assets/jquery_test.html", "test/helper.rb", "test/johnson/browser_test.rb", "test/johnson/conversions/array_test.rb", "test/johnson/conversions/boolean_test.rb", "test/johnson/conversions/callable_test.rb", "test/johnson/conversions/file_test.rb", "test/johnson/conversions/nil_test.rb", "test/johnson/conversions/number_test.rb", "test/johnson/conversions/regexp_test.rb", "test/johnson/conversions/string_test.rb", "test/johnson/conversions/struct_test.rb", "test/johnson/conversions/symbol_test.rb", "test/johnson/conversions/thread_test.rb", "test/johnson/error_test.rb", "test/johnson/extensions_test.rb", "test/johnson/nodes/array_literal_test.rb", "test/johnson/nodes/array_node_test.rb", "test/johnson/nodes/binary_node_test.rb", "test/johnson/nodes/bracket_access_test.rb", "test/johnson/nodes/delete_test.rb", "test/johnson/nodes/do_while_test.rb", "test/johnson/nodes/dot_accessor_test.rb", "test/johnson/nodes/export_test.rb", "test/johnson/nodes/for_test.rb", "test/johnson/nodes/function_test.rb", "test/johnson/nodes/if_test.rb", "test/johnson/nodes/import_test.rb", "test/johnson/nodes/label_test.rb", "test/johnson/nodes/object_literal_test.rb", "test/johnson/nodes/return_test.rb", "test/johnson/nodes/semi_test.rb", "test/johnson/nodes/switch_test.rb", "test/johnson/nodes/ternary_test.rb", "test/johnson/nodes/throw_test.rb", "test/johnson/nodes/try_node_test.rb", "test/johnson/nodes/typeof_test.rb", "test/johnson/nodes/unary_node_test.rb", "test/johnson/nodes/void_test.rb", "test/johnson/nodes/while_test.rb", "test/johnson/nodes/with_test.rb", "test/johnson/prelude_test.rb", "test/johnson/runtime_test.rb", "test/johnson/spidermonkey/context_test.rb", "test/johnson/spidermonkey/immutable_node_test.rb", "test/johnson/spidermonkey/js_land_proxy_test.rb", "test/johnson/spidermonkey/ruby_land_proxy_test.rb", "test/johnson/spidermonkey/runtime_test.rb", "test/johnson/version_test.rb", "test/johnson/visitors/dot_visitor_test.rb", "test/johnson/visitors/enumerating_visitor_test.rb", "test/johnson_test.rb", "test/jquery_units/test.js", "test/jquery_units/test_helper.js", "test/jquery_units/units/ajax.js", "test/jquery_units/units/core.js", "test/jquery_units/units/event.js", "test/jquery_units/units/fx.js", "test/jquery_units/units/offset.js", "test/jquery_units/units/selector.js", "test/jspec/helper.js", "test/jspec/jspec.js", "test/jspec/simple_spec.js", "test/parser_test.rb", "todo/.keep", "vendor/spidermonkey/.cvsignore", "vendor/spidermonkey/Makefile.in", "vendor/spidermonkey/Makefile.ref", "vendor/spidermonkey/README.html", "vendor/spidermonkey/SpiderMonkey.rsp", "vendor/spidermonkey/Y.js", "vendor/spidermonkey/build.mk", "vendor/spidermonkey/config.mk", "vendor/spidermonkey/config/AIX4.1.mk", "vendor/spidermonkey/config/AIX4.2.mk", "vendor/spidermonkey/config/AIX4.3.mk", "vendor/spidermonkey/config/Darwin.mk", "vendor/spidermonkey/config/Darwin1.3.mk", "vendor/spidermonkey/config/Darwin1.4.mk", "vendor/spidermonkey/config/Darwin5.2.mk", "vendor/spidermonkey/config/Darwin5.3.mk", "vendor/spidermonkey/config/HP-UXB.10.10.mk", "vendor/spidermonkey/config/HP-UXB.10.20.mk", "vendor/spidermonkey/config/HP-UXB.11.00.mk", "vendor/spidermonkey/config/IRIX.mk", "vendor/spidermonkey/config/IRIX5.3.mk", "vendor/spidermonkey/config/IRIX6.1.mk", "vendor/spidermonkey/config/IRIX6.2.mk", "vendor/spidermonkey/config/IRIX6.3.mk", "vendor/spidermonkey/config/IRIX6.5.mk", "vendor/spidermonkey/config/Linux_All.mk", "vendor/spidermonkey/config/Mac_OS10.0.mk", "vendor/spidermonkey/config/OSF1V4.0.mk", "vendor/spidermonkey/config/OSF1V5.0.mk", "vendor/spidermonkey/config/SunOS4.1.4.mk", "vendor/spidermonkey/config/SunOS5.10.mk", "vendor/spidermonkey/config/SunOS5.3.mk", "vendor/spidermonkey/config/SunOS5.4.mk", "vendor/spidermonkey/config/SunOS5.5.1.mk", "vendor/spidermonkey/config/SunOS5.5.mk", "vendor/spidermonkey/config/SunOS5.6.mk", "vendor/spidermonkey/config/SunOS5.7.mk", "vendor/spidermonkey/config/SunOS5.8.mk", "vendor/spidermonkey/config/SunOS5.9.mk", "vendor/spidermonkey/config/WINNT4.0.mk", "vendor/spidermonkey/config/WINNT5.0.mk", "vendor/spidermonkey/config/WINNT5.1.mk", "vendor/spidermonkey/config/WINNT5.2.mk", "vendor/spidermonkey/config/WINNT6.0.mk", "vendor/spidermonkey/config/dgux.mk", "vendor/spidermonkey/editline/Makefile.ref", "vendor/spidermonkey/editline/README", "vendor/spidermonkey/editline/editline.3", "vendor/spidermonkey/editline/editline.c", "vendor/spidermonkey/editline/editline.h", "vendor/spidermonkey/editline/sysunix.c", "vendor/spidermonkey/editline/unix.h", "vendor/spidermonkey/fdlibm/.cvsignore", "vendor/spidermonkey/fdlibm/Makefile.in", "vendor/spidermonkey/fdlibm/Makefile.ref", "vendor/spidermonkey/fdlibm/e_acos.c", "vendor/spidermonkey/fdlibm/e_acosh.c", "vendor/spidermonkey/fdlibm/e_asin.c", "vendor/spidermonkey/fdlibm/e_atan2.c", "vendor/spidermonkey/fdlibm/e_atanh.c", "vendor/spidermonkey/fdlibm/e_cosh.c", "vendor/spidermonkey/fdlibm/e_exp.c", "vendor/spidermonkey/fdlibm/e_fmod.c", "vendor/spidermonkey/fdlibm/e_gamma.c", "vendor/spidermonkey/fdlibm/e_gamma_r.c", "vendor/spidermonkey/fdlibm/e_hypot.c", "vendor/spidermonkey/fdlibm/e_j0.c", "vendor/spidermonkey/fdlibm/e_j1.c", "vendor/spidermonkey/fdlibm/e_jn.c", "vendor/spidermonkey/fdlibm/e_lgamma.c", "vendor/spidermonkey/fdlibm/e_lgamma_r.c", "vendor/spidermonkey/fdlibm/e_log.c", "vendor/spidermonkey/fdlibm/e_log10.c", "vendor/spidermonkey/fdlibm/e_pow.c", "vendor/spidermonkey/fdlibm/e_rem_pio2.c", "vendor/spidermonkey/fdlibm/e_remainder.c", "vendor/spidermonkey/fdlibm/e_scalb.c", "vendor/spidermonkey/fdlibm/e_sinh.c", "vendor/spidermonkey/fdlibm/e_sqrt.c", "vendor/spidermonkey/fdlibm/fdlibm.h", "vendor/spidermonkey/fdlibm/fdlibm.mak", "vendor/spidermonkey/fdlibm/fdlibm.mdp", "vendor/spidermonkey/fdlibm/k_cos.c", "vendor/spidermonkey/fdlibm/k_rem_pio2.c", "vendor/spidermonkey/fdlibm/k_sin.c", "vendor/spidermonkey/fdlibm/k_standard.c", "vendor/spidermonkey/fdlibm/k_tan.c", "vendor/spidermonkey/fdlibm/s_asinh.c", "vendor/spidermonkey/fdlibm/s_atan.c", "vendor/spidermonkey/fdlibm/s_cbrt.c", "vendor/spidermonkey/fdlibm/s_ceil.c", "vendor/spidermonkey/fdlibm/s_copysign.c", "vendor/spidermonkey/fdlibm/s_cos.c", "vendor/spidermonkey/fdlibm/s_erf.c", "vendor/spidermonkey/fdlibm/s_expm1.c", "vendor/spidermonkey/fdlibm/s_fabs.c", "vendor/spidermonkey/fdlibm/s_finite.c", "vendor/spidermonkey/fdlibm/s_floor.c", "vendor/spidermonkey/fdlibm/s_frexp.c", "vendor/spidermonkey/fdlibm/s_ilogb.c", "vendor/spidermonkey/fdlibm/s_isnan.c", "vendor/spidermonkey/fdlibm/s_ldexp.c", "vendor/spidermonkey/fdlibm/s_lib_version.c", "vendor/spidermonkey/fdlibm/s_log1p.c", "vendor/spidermonkey/fdlibm/s_logb.c", "vendor/spidermonkey/fdlibm/s_matherr.c", "vendor/spidermonkey/fdlibm/s_modf.c", "vendor/spidermonkey/fdlibm/s_nextafter.c", "vendor/spidermonkey/fdlibm/s_rint.c", "vendor/spidermonkey/fdlibm/s_scalbn.c", "vendor/spidermonkey/fdlibm/s_signgam.c", "vendor/spidermonkey/fdlibm/s_significand.c", "vendor/spidermonkey/fdlibm/s_sin.c", "vendor/spidermonkey/fdlibm/s_tan.c", "vendor/spidermonkey/fdlibm/s_tanh.c", "vendor/spidermonkey/fdlibm/w_acos.c", "vendor/spidermonkey/fdlibm/w_acosh.c", "vendor/spidermonkey/fdlibm/w_asin.c", "vendor/spidermonkey/fdlibm/w_atan2.c", "vendor/spidermonkey/fdlibm/w_atanh.c", "vendor/spidermonkey/fdlibm/w_cosh.c", "vendor/spidermonkey/fdlibm/w_exp.c", "vendor/spidermonkey/fdlibm/w_fmod.c", "vendor/spidermonkey/fdlibm/w_gamma.c", "vendor/spidermonkey/fdlibm/w_gamma_r.c", "vendor/spidermonkey/fdlibm/w_hypot.c", "vendor/spidermonkey/fdlibm/w_j0.c", "vendor/spidermonkey/fdlibm/w_j1.c", "vendor/spidermonkey/fdlibm/w_jn.c", "vendor/spidermonkey/fdlibm/w_lgamma.c", "vendor/spidermonkey/fdlibm/w_lgamma_r.c", "vendor/spidermonkey/fdlibm/w_log.c", "vendor/spidermonkey/fdlibm/w_log10.c", "vendor/spidermonkey/fdlibm/w_pow.c", "vendor/spidermonkey/fdlibm/w_remainder.c", "vendor/spidermonkey/fdlibm/w_scalb.c", "vendor/spidermonkey/fdlibm/w_sinh.c", "vendor/spidermonkey/fdlibm/w_sqrt.c", "vendor/spidermonkey/javascript-trace.d", "vendor/spidermonkey/js.c", "vendor/spidermonkey/js.mak", "vendor/spidermonkey/js.mdp", "vendor/spidermonkey/js.msg", "vendor/spidermonkey/js.pkg", "vendor/spidermonkey/js3240.rc", "vendor/spidermonkey/jsOS240.def", "vendor/spidermonkey/jsapi.c", "vendor/spidermonkey/jsapi.h", "vendor/spidermonkey/jsarena.c", "vendor/spidermonkey/jsarena.h", "vendor/spidermonkey/jsarray.c", "vendor/spidermonkey/jsarray.h", "vendor/spidermonkey/jsatom.c", "vendor/spidermonkey/jsatom.h", "vendor/spidermonkey/jsbit.h", "vendor/spidermonkey/jsbool.c", "vendor/spidermonkey/jsbool.h", "vendor/spidermonkey/jsclist.h", "vendor/spidermonkey/jscntxt.c", "vendor/spidermonkey/jscntxt.h", "vendor/spidermonkey/jscompat.h", "vendor/spidermonkey/jsconfig.h", "vendor/spidermonkey/jsconfig.mk", "vendor/spidermonkey/jscpucfg.c", "vendor/spidermonkey/jscpucfg.h", "vendor/spidermonkey/jsdate.c", "vendor/spidermonkey/jsdate.h", "vendor/spidermonkey/jsdbgapi.c", "vendor/spidermonkey/jsdbgapi.h", "vendor/spidermonkey/jsdhash.c", "vendor/spidermonkey/jsdhash.h", "vendor/spidermonkey/jsdtoa.c", "vendor/spidermonkey/jsdtoa.h", "vendor/spidermonkey/jsdtracef.c", "vendor/spidermonkey/jsdtracef.h", "vendor/spidermonkey/jsemit.c", "vendor/spidermonkey/jsemit.h", "vendor/spidermonkey/jsexn.c", "vendor/spidermonkey/jsexn.h", "vendor/spidermonkey/jsfile.c", "vendor/spidermonkey/jsfile.h", "vendor/spidermonkey/jsfile.msg", "vendor/spidermonkey/jsfun.c", "vendor/spidermonkey/jsfun.h", "vendor/spidermonkey/jsgc.c", "vendor/spidermonkey/jsgc.h", "vendor/spidermonkey/jshash.c", "vendor/spidermonkey/jshash.h", "vendor/spidermonkey/jsify.pl", "vendor/spidermonkey/jsinterp.c", "vendor/spidermonkey/jsinterp.h", "vendor/spidermonkey/jsinvoke.c", "vendor/spidermonkey/jsiter.c", "vendor/spidermonkey/jsiter.h", "vendor/spidermonkey/jskeyword.tbl", "vendor/spidermonkey/jskwgen.c", "vendor/spidermonkey/jslibmath.h", "vendor/spidermonkey/jslock.c", "vendor/spidermonkey/jslock.h", "vendor/spidermonkey/jslocko.asm", "vendor/spidermonkey/jslog2.c", "vendor/spidermonkey/jslong.c", "vendor/spidermonkey/jslong.h", "vendor/spidermonkey/jsmath.c", "vendor/spidermonkey/jsmath.h", "vendor/spidermonkey/jsnum.c", "vendor/spidermonkey/jsnum.h", "vendor/spidermonkey/jsobj.c", "vendor/spidermonkey/jsobj.h", "vendor/spidermonkey/jsopcode.c", "vendor/spidermonkey/jsopcode.h", "vendor/spidermonkey/jsopcode.tbl", "vendor/spidermonkey/jsotypes.h", "vendor/spidermonkey/jsparse.c", "vendor/spidermonkey/jsparse.h", "vendor/spidermonkey/jsprf.c", "vendor/spidermonkey/jsprf.h", "vendor/spidermonkey/jsproto.tbl", "vendor/spidermonkey/jsprvtd.h", "vendor/spidermonkey/jspubtd.h", "vendor/spidermonkey/jsregexp.c", "vendor/spidermonkey/jsregexp.h", "vendor/spidermonkey/jsreops.tbl", "vendor/spidermonkey/jsscan.c", "vendor/spidermonkey/jsscan.h", "vendor/spidermonkey/jsscope.c", "vendor/spidermonkey/jsscope.h", "vendor/spidermonkey/jsscript.c", "vendor/spidermonkey/jsscript.h", "vendor/spidermonkey/jsshell.msg", "vendor/spidermonkey/jsstddef.h", "vendor/spidermonkey/jsstr.c", "vendor/spidermonkey/jsstr.h", "vendor/spidermonkey/jstypes.h", "vendor/spidermonkey/jsutil.c", "vendor/spidermonkey/jsutil.h", "vendor/spidermonkey/jsxdrapi.c", "vendor/spidermonkey/jsxdrapi.h", "vendor/spidermonkey/jsxml.c", "vendor/spidermonkey/jsxml.h", "vendor/spidermonkey/lock_SunOS.s", "vendor/spidermonkey/perfect.js", "vendor/spidermonkey/plify_jsdhash.sed", "vendor/spidermonkey/prmjtime.c", "vendor/spidermonkey/prmjtime.h", "vendor/spidermonkey/resource.h", "vendor/spidermonkey/rules.mk", "vendor/spidermonkey/win32.order"]
16
+ s.files = ["CHANGELOG", "MANIFEST", "MINGW32.mk", "README.rdoc", "Rakefile", "bin/johnson", "cross-compile.txt", "ext/spidermonkey/context.c", "ext/spidermonkey/context.h", "ext/spidermonkey/conversions.c", "ext/spidermonkey/conversions.h", "ext/spidermonkey/debugger.c", "ext/spidermonkey/debugger.h", "ext/spidermonkey/extconf.rb", "ext/spidermonkey/extensions.c", "ext/spidermonkey/extensions.h", "ext/spidermonkey/global.c", "ext/spidermonkey/global.h", "ext/spidermonkey/idhash.c", "ext/spidermonkey/idhash.h", "ext/spidermonkey/immutable_node.c", "ext/spidermonkey/immutable_node.c.erb", "ext/spidermonkey/immutable_node.h", "ext/spidermonkey/jroot.h", "ext/spidermonkey/js_land_proxy.c", "ext/spidermonkey/js_land_proxy.h", "ext/spidermonkey/ruby_land_proxy.c", "ext/spidermonkey/ruby_land_proxy.h", "ext/spidermonkey/runtime.c", "ext/spidermonkey/runtime.h", "ext/spidermonkey/spidermonkey.c", "ext/spidermonkey/spidermonkey.h", "johnson.gemspec", "js/johnson/browser.js", "js/johnson/browser/env.js", "js/johnson/browser/jquery.js", "js/johnson/browser/xmlsax.js", "js/johnson/browser/xmlw3cdom.js", "js/johnson/cli.js", "js/johnson/prelude.js", "js/johnson/template.js", "lib/hoe.rb", "lib/johnson.rb", "lib/johnson/cli.rb", "lib/johnson/cli/options.rb", "lib/johnson/error.rb", "lib/johnson/nodes.rb", "lib/johnson/nodes/binary_node.rb", "lib/johnson/nodes/for.rb", "lib/johnson/nodes/for_in.rb", "lib/johnson/nodes/function.rb", "lib/johnson/nodes/list.rb", "lib/johnson/nodes/node.rb", "lib/johnson/nodes/ternary_node.rb", "lib/johnson/parser.rb", "lib/johnson/parser/syntax_error.rb", "lib/johnson/runtime.rb", "lib/johnson/spidermonkey/context.rb", "lib/johnson/spidermonkey/debugger.rb", "lib/johnson/spidermonkey/immutable_node.rb", "lib/johnson/spidermonkey/js_land_proxy.rb", "lib/johnson/spidermonkey/mutable_tree_visitor.rb", "lib/johnson/spidermonkey/ruby_land_proxy.rb", "lib/johnson/spidermonkey/runtime.rb", "lib/johnson/version.rb", "lib/johnson/visitable.rb", "lib/johnson/visitors.rb", "lib/johnson/visitors/dot_visitor.rb", "lib/johnson/visitors/ecma_visitor.rb", "lib/johnson/visitors/enumerating_visitor.rb", "lib/johnson/visitors/sexp_visitor.rb", "lib/rails/init.rb", "test/assets/index.html", "test/assets/jquery_test.html", "test/helper.rb", "test/johnson/browser_test.rb", "test/johnson/conversions/array_test.rb", "test/johnson/conversions/boolean_test.rb", "test/johnson/conversions/callable_test.rb", "test/johnson/conversions/file_test.rb", "test/johnson/conversions/nil_test.rb", "test/johnson/conversions/number_test.rb", "test/johnson/conversions/regexp_test.rb", "test/johnson/conversions/string_test.rb", "test/johnson/conversions/struct_test.rb", "test/johnson/conversions/symbol_test.rb", "test/johnson/conversions/thread_test.rb", "test/johnson/error_test.rb", "test/johnson/extensions_test.rb", "test/johnson/nodes/array_literal_test.rb", "test/johnson/nodes/array_node_test.rb", "test/johnson/nodes/binary_node_test.rb", "test/johnson/nodes/bracket_access_test.rb", "test/johnson/nodes/delete_test.rb", "test/johnson/nodes/do_while_test.rb", "test/johnson/nodes/dot_accessor_test.rb", "test/johnson/nodes/export_test.rb", "test/johnson/nodes/for_test.rb", "test/johnson/nodes/function_test.rb", "test/johnson/nodes/if_test.rb", "test/johnson/nodes/import_test.rb", "test/johnson/nodes/label_test.rb", "test/johnson/nodes/object_literal_test.rb", "test/johnson/nodes/return_test.rb", "test/johnson/nodes/semi_test.rb", "test/johnson/nodes/switch_test.rb", "test/johnson/nodes/ternary_test.rb", "test/johnson/nodes/throw_test.rb", "test/johnson/nodes/try_node_test.rb", "test/johnson/nodes/typeof_test.rb", "test/johnson/nodes/unary_node_test.rb", "test/johnson/nodes/void_test.rb", "test/johnson/nodes/while_test.rb", "test/johnson/nodes/with_test.rb", "test/johnson/prelude_test.rb", "test/johnson/runtime_test.rb", "test/johnson/spidermonkey/context_test.rb", "test/johnson/spidermonkey/immutable_node_test.rb", "test/johnson/spidermonkey/js_land_proxy_test.rb", "test/johnson/spidermonkey/ruby_land_proxy_test.rb", "test/johnson/spidermonkey/runtime_test.rb", "test/johnson/version_test.rb", "test/johnson/visitors/dot_visitor_test.rb", "test/johnson/visitors/enumerating_visitor_test.rb", "test/johnson_test.rb", "test/jquery_units/test.js", "test/jquery_units/test_helper.js", "test/jquery_units/units/ajax.js", "test/jquery_units/units/core.js", "test/jquery_units/units/event.js", "test/jquery_units/units/fx.js", "test/jquery_units/units/offset.js", "test/jquery_units/units/selector.js", "test/jspec/helper.js", "test/jspec/jspec.js", "test/jspec/simple_spec.js", "test/parser_test.rb", "todo/.keep", "vendor/spidermonkey/.cvsignore", "vendor/spidermonkey/Makefile.in", "vendor/spidermonkey/Makefile.ref", "vendor/spidermonkey/README.html", "vendor/spidermonkey/SpiderMonkey.rsp", "vendor/spidermonkey/Y.js", "vendor/spidermonkey/build.mk", "vendor/spidermonkey/config.mk", "vendor/spidermonkey/config/AIX4.1.mk", "vendor/spidermonkey/config/AIX4.2.mk", "vendor/spidermonkey/config/AIX4.3.mk", "vendor/spidermonkey/config/Darwin.mk", "vendor/spidermonkey/config/Darwin1.3.mk", "vendor/spidermonkey/config/Darwin1.4.mk", "vendor/spidermonkey/config/Darwin5.2.mk", "vendor/spidermonkey/config/Darwin5.3.mk", "vendor/spidermonkey/config/HP-UXB.10.10.mk", "vendor/spidermonkey/config/HP-UXB.10.20.mk", "vendor/spidermonkey/config/HP-UXB.11.00.mk", "vendor/spidermonkey/config/IRIX.mk", "vendor/spidermonkey/config/IRIX5.3.mk", "vendor/spidermonkey/config/IRIX6.1.mk", "vendor/spidermonkey/config/IRIX6.2.mk", "vendor/spidermonkey/config/IRIX6.3.mk", "vendor/spidermonkey/config/IRIX6.5.mk", "vendor/spidermonkey/config/Linux_All.mk", "vendor/spidermonkey/config/Mac_OS10.0.mk", "vendor/spidermonkey/config/OSF1V4.0.mk", "vendor/spidermonkey/config/OSF1V5.0.mk", "vendor/spidermonkey/config/SunOS4.1.4.mk", "vendor/spidermonkey/config/SunOS5.10.mk", "vendor/spidermonkey/config/SunOS5.3.mk", "vendor/spidermonkey/config/SunOS5.4.mk", "vendor/spidermonkey/config/SunOS5.5.1.mk", "vendor/spidermonkey/config/SunOS5.5.mk", "vendor/spidermonkey/config/SunOS5.6.mk", "vendor/spidermonkey/config/SunOS5.7.mk", "vendor/spidermonkey/config/SunOS5.8.mk", "vendor/spidermonkey/config/SunOS5.9.mk", "vendor/spidermonkey/config/WINNT4.0.mk", "vendor/spidermonkey/config/WINNT5.0.mk", "vendor/spidermonkey/config/WINNT5.1.mk", "vendor/spidermonkey/config/WINNT5.2.mk", "vendor/spidermonkey/config/WINNT6.0.mk", "vendor/spidermonkey/config/dgux.mk", "vendor/spidermonkey/editline/Makefile.ref", "vendor/spidermonkey/editline/README", "vendor/spidermonkey/editline/editline.3", "vendor/spidermonkey/editline/editline.c", "vendor/spidermonkey/editline/editline.h", "vendor/spidermonkey/editline/sysunix.c", "vendor/spidermonkey/editline/unix.h", "vendor/spidermonkey/fdlibm/.cvsignore", "vendor/spidermonkey/fdlibm/Makefile.in", "vendor/spidermonkey/fdlibm/Makefile.ref", "vendor/spidermonkey/fdlibm/e_acos.c", "vendor/spidermonkey/fdlibm/e_acosh.c", "vendor/spidermonkey/fdlibm/e_asin.c", "vendor/spidermonkey/fdlibm/e_atan2.c", "vendor/spidermonkey/fdlibm/e_atanh.c", "vendor/spidermonkey/fdlibm/e_cosh.c", "vendor/spidermonkey/fdlibm/e_exp.c", "vendor/spidermonkey/fdlibm/e_fmod.c", "vendor/spidermonkey/fdlibm/e_gamma.c", "vendor/spidermonkey/fdlibm/e_gamma_r.c", "vendor/spidermonkey/fdlibm/e_hypot.c", "vendor/spidermonkey/fdlibm/e_j0.c", "vendor/spidermonkey/fdlibm/e_j1.c", "vendor/spidermonkey/fdlibm/e_jn.c", "vendor/spidermonkey/fdlibm/e_lgamma.c", "vendor/spidermonkey/fdlibm/e_lgamma_r.c", "vendor/spidermonkey/fdlibm/e_log.c", "vendor/spidermonkey/fdlibm/e_log10.c", "vendor/spidermonkey/fdlibm/e_pow.c", "vendor/spidermonkey/fdlibm/e_rem_pio2.c", "vendor/spidermonkey/fdlibm/e_remainder.c", "vendor/spidermonkey/fdlibm/e_scalb.c", "vendor/spidermonkey/fdlibm/e_sinh.c", "vendor/spidermonkey/fdlibm/e_sqrt.c", "vendor/spidermonkey/fdlibm/fdlibm.h", "vendor/spidermonkey/fdlibm/fdlibm.mak", "vendor/spidermonkey/fdlibm/fdlibm.mdp", "vendor/spidermonkey/fdlibm/k_cos.c", "vendor/spidermonkey/fdlibm/k_rem_pio2.c", "vendor/spidermonkey/fdlibm/k_sin.c", "vendor/spidermonkey/fdlibm/k_standard.c", "vendor/spidermonkey/fdlibm/k_tan.c", "vendor/spidermonkey/fdlibm/s_asinh.c", "vendor/spidermonkey/fdlibm/s_atan.c", "vendor/spidermonkey/fdlibm/s_cbrt.c", "vendor/spidermonkey/fdlibm/s_ceil.c", "vendor/spidermonkey/fdlibm/s_copysign.c", "vendor/spidermonkey/fdlibm/s_cos.c", "vendor/spidermonkey/fdlibm/s_erf.c", "vendor/spidermonkey/fdlibm/s_expm1.c", "vendor/spidermonkey/fdlibm/s_fabs.c", "vendor/spidermonkey/fdlibm/s_finite.c", "vendor/spidermonkey/fdlibm/s_floor.c", "vendor/spidermonkey/fdlibm/s_frexp.c", "vendor/spidermonkey/fdlibm/s_ilogb.c", "vendor/spidermonkey/fdlibm/s_isnan.c", "vendor/spidermonkey/fdlibm/s_ldexp.c", "vendor/spidermonkey/fdlibm/s_lib_version.c", "vendor/spidermonkey/fdlibm/s_log1p.c", "vendor/spidermonkey/fdlibm/s_logb.c", "vendor/spidermonkey/fdlibm/s_matherr.c", "vendor/spidermonkey/fdlibm/s_modf.c", "vendor/spidermonkey/fdlibm/s_nextafter.c", "vendor/spidermonkey/fdlibm/s_rint.c", "vendor/spidermonkey/fdlibm/s_scalbn.c", "vendor/spidermonkey/fdlibm/s_signgam.c", "vendor/spidermonkey/fdlibm/s_significand.c", "vendor/spidermonkey/fdlibm/s_sin.c", "vendor/spidermonkey/fdlibm/s_tan.c", "vendor/spidermonkey/fdlibm/s_tanh.c", "vendor/spidermonkey/fdlibm/w_acos.c", "vendor/spidermonkey/fdlibm/w_acosh.c", "vendor/spidermonkey/fdlibm/w_asin.c", "vendor/spidermonkey/fdlibm/w_atan2.c", "vendor/spidermonkey/fdlibm/w_atanh.c", "vendor/spidermonkey/fdlibm/w_cosh.c", "vendor/spidermonkey/fdlibm/w_exp.c", "vendor/spidermonkey/fdlibm/w_fmod.c", "vendor/spidermonkey/fdlibm/w_gamma.c", "vendor/spidermonkey/fdlibm/w_gamma_r.c", "vendor/spidermonkey/fdlibm/w_hypot.c", "vendor/spidermonkey/fdlibm/w_j0.c", "vendor/spidermonkey/fdlibm/w_j1.c", "vendor/spidermonkey/fdlibm/w_jn.c", "vendor/spidermonkey/fdlibm/w_lgamma.c", "vendor/spidermonkey/fdlibm/w_lgamma_r.c", "vendor/spidermonkey/fdlibm/w_log.c", "vendor/spidermonkey/fdlibm/w_log10.c", "vendor/spidermonkey/fdlibm/w_pow.c", "vendor/spidermonkey/fdlibm/w_remainder.c", "vendor/spidermonkey/fdlibm/w_scalb.c", "vendor/spidermonkey/fdlibm/w_sinh.c", "vendor/spidermonkey/fdlibm/w_sqrt.c", "vendor/spidermonkey/javascript-trace.d", "vendor/spidermonkey/js.c", "vendor/spidermonkey/js.mak", "vendor/spidermonkey/js.mdp", "vendor/spidermonkey/js.msg", "vendor/spidermonkey/js.pkg", "vendor/spidermonkey/js3240.rc", "vendor/spidermonkey/jsOS240.def", "vendor/spidermonkey/jsapi.c", "vendor/spidermonkey/jsapi.h", "vendor/spidermonkey/jsarena.c", "vendor/spidermonkey/jsarena.h", "vendor/spidermonkey/jsarray.c", "vendor/spidermonkey/jsarray.h", "vendor/spidermonkey/jsatom.c", "vendor/spidermonkey/jsatom.h", "vendor/spidermonkey/jsbit.h", "vendor/spidermonkey/jsbool.c", "vendor/spidermonkey/jsbool.h", "vendor/spidermonkey/jsclist.h", "vendor/spidermonkey/jscntxt.c", "vendor/spidermonkey/jscntxt.h", "vendor/spidermonkey/jscompat.h", "vendor/spidermonkey/jsconfig.h", "vendor/spidermonkey/jsconfig.mk", "vendor/spidermonkey/jscpucfg.c", "vendor/spidermonkey/jscpucfg.h", "vendor/spidermonkey/jsdate.c", "vendor/spidermonkey/jsdate.h", "vendor/spidermonkey/jsdbgapi.c", "vendor/spidermonkey/jsdbgapi.h", "vendor/spidermonkey/jsdhash.c", "vendor/spidermonkey/jsdhash.h", "vendor/spidermonkey/jsdtoa.c", "vendor/spidermonkey/jsdtoa.h", "vendor/spidermonkey/jsdtracef.c", "vendor/spidermonkey/jsdtracef.h", "vendor/spidermonkey/jsemit.c", "vendor/spidermonkey/jsemit.h", "vendor/spidermonkey/jsexn.c", "vendor/spidermonkey/jsexn.h", "vendor/spidermonkey/jsfile.c", "vendor/spidermonkey/jsfile.h", "vendor/spidermonkey/jsfile.msg", "vendor/spidermonkey/jsfun.c", "vendor/spidermonkey/jsfun.h", "vendor/spidermonkey/jsgc.c", "vendor/spidermonkey/jsgc.h", "vendor/spidermonkey/jshash.c", "vendor/spidermonkey/jshash.h", "vendor/spidermonkey/jsify.pl", "vendor/spidermonkey/jsinterp.c", "vendor/spidermonkey/jsinterp.h", "vendor/spidermonkey/jsinvoke.c", "vendor/spidermonkey/jsiter.c", "vendor/spidermonkey/jsiter.h", "vendor/spidermonkey/jskeyword.tbl", "vendor/spidermonkey/jskwgen.c", "vendor/spidermonkey/jslibmath.h", "vendor/spidermonkey/jslock.c", "vendor/spidermonkey/jslock.h", "vendor/spidermonkey/jslocko.asm", "vendor/spidermonkey/jslog2.c", "vendor/spidermonkey/jslong.c", "vendor/spidermonkey/jslong.h", "vendor/spidermonkey/jsmath.c", "vendor/spidermonkey/jsmath.h", "vendor/spidermonkey/jsnum.c", "vendor/spidermonkey/jsnum.h", "vendor/spidermonkey/jsobj.c", "vendor/spidermonkey/jsobj.h", "vendor/spidermonkey/jsopcode.c", "vendor/spidermonkey/jsopcode.h", "vendor/spidermonkey/jsopcode.tbl", "vendor/spidermonkey/jsotypes.h", "vendor/spidermonkey/jsparse.c", "vendor/spidermonkey/jsparse.h", "vendor/spidermonkey/jsprf.c", "vendor/spidermonkey/jsprf.h", "vendor/spidermonkey/jsproto.tbl", "vendor/spidermonkey/jsprvtd.h", "vendor/spidermonkey/jspubtd.h", "vendor/spidermonkey/jsregexp.c", "vendor/spidermonkey/jsregexp.h", "vendor/spidermonkey/jsreops.tbl", "vendor/spidermonkey/jsscan.c", "vendor/spidermonkey/jsscan.h", "vendor/spidermonkey/jsscope.c", "vendor/spidermonkey/jsscope.h", "vendor/spidermonkey/jsscript.c", "vendor/spidermonkey/jsscript.h", "vendor/spidermonkey/jsshell.msg", "vendor/spidermonkey/jsstddef.h", "vendor/spidermonkey/jsstr.c", "vendor/spidermonkey/jsstr.h", "vendor/spidermonkey/jstypes.h", "vendor/spidermonkey/jsutil.c", "vendor/spidermonkey/jsutil.h", "vendor/spidermonkey/jsxdrapi.c", "vendor/spidermonkey/jsxdrapi.h", "vendor/spidermonkey/jsxml.c", "vendor/spidermonkey/jsxml.h", "vendor/spidermonkey/lock_SunOS.s", "vendor/spidermonkey/perfect.js", "vendor/spidermonkey/plify_jsdhash.sed", "vendor/spidermonkey/prmjtime.c", "vendor/spidermonkey/prmjtime.h", "vendor/spidermonkey/resource.h", "vendor/spidermonkey/rules.mk", "vendor/spidermonkey/win32.order", "test/johnson/nodes/let_test.rb"]
15
17
  s.has_rdoc = true
16
18
  s.homepage = %q{http://github.com/jbarnette/johnson/wikis}
17
19
  s.rdoc_options = ["--main", "README.rdoc"]
18
20
  s.require_paths = ["lib", "ext"]
19
21
  s.rubyforge_project = %q{johnson}
20
- s.rubygems_version = %q{1.2.0}
22
+ s.rubygems_version = %q{1.3.1}
21
23
  s.summary = %q{Johnson wraps JavaScript in a loving Ruby embrace.}
22
- s.test_files = ["test/johnson/browser_test.rb", "test/johnson/conversions/array_test.rb", "test/johnson/conversions/boolean_test.rb", "test/johnson/conversions/callable_test.rb", "test/johnson/conversions/file_test.rb", "test/johnson/conversions/nil_test.rb", "test/johnson/conversions/number_test.rb", "test/johnson/conversions/regexp_test.rb", "test/johnson/conversions/string_test.rb", "test/johnson/conversions/struct_test.rb", "test/johnson/conversions/symbol_test.rb", "test/johnson/conversions/thread_test.rb", "test/johnson/error_test.rb", "test/johnson/extensions_test.rb", "test/johnson/nodes/array_literal_test.rb", "test/johnson/nodes/array_node_test.rb", "test/johnson/nodes/binary_node_test.rb", "test/johnson/nodes/bracket_access_test.rb", "test/johnson/nodes/delete_test.rb", "test/johnson/nodes/do_while_test.rb", "test/johnson/nodes/dot_accessor_test.rb", "test/johnson/nodes/export_test.rb", "test/johnson/nodes/for_test.rb", "test/johnson/nodes/function_test.rb", "test/johnson/nodes/if_test.rb", "test/johnson/nodes/import_test.rb", "test/johnson/nodes/label_test.rb", "test/johnson/nodes/object_literal_test.rb", "test/johnson/nodes/return_test.rb", "test/johnson/nodes/semi_test.rb", "test/johnson/nodes/switch_test.rb", "test/johnson/nodes/ternary_test.rb", "test/johnson/nodes/throw_test.rb", "test/johnson/nodes/try_node_test.rb", "test/johnson/nodes/typeof_test.rb", "test/johnson/nodes/unary_node_test.rb", "test/johnson/nodes/void_test.rb", "test/johnson/nodes/while_test.rb", "test/johnson/nodes/with_test.rb", "test/johnson/prelude_test.rb", "test/johnson/runtime_test.rb", "test/johnson/spidermonkey/context_test.rb", "test/johnson/spidermonkey/immutable_node_test.rb", "test/johnson/spidermonkey/js_land_proxy_test.rb", "test/johnson/spidermonkey/ruby_land_proxy_test.rb", "test/johnson/spidermonkey/runtime_test.rb", "test/johnson/version_test.rb", "test/johnson/visitors/dot_visitor_test.rb", "test/johnson/visitors/enumerating_visitor_test.rb", "test/johnson_test.rb", "test/parser_test.rb"]
24
+ s.test_files = ["test/johnson/browser_test.rb", "test/johnson/conversions/array_test.rb", "test/johnson/conversions/boolean_test.rb", "test/johnson/conversions/callable_test.rb", "test/johnson/conversions/file_test.rb", "test/johnson/conversions/nil_test.rb", "test/johnson/conversions/number_test.rb", "test/johnson/conversions/regexp_test.rb", "test/johnson/conversions/string_test.rb", "test/johnson/conversions/struct_test.rb", "test/johnson/conversions/symbol_test.rb", "test/johnson/conversions/thread_test.rb", "test/johnson/error_test.rb", "test/johnson/extensions_test.rb", "test/johnson/nodes/array_literal_test.rb", "test/johnson/nodes/array_node_test.rb", "test/johnson/nodes/binary_node_test.rb", "test/johnson/nodes/bracket_access_test.rb", "test/johnson/nodes/delete_test.rb", "test/johnson/nodes/do_while_test.rb", "test/johnson/nodes/dot_accessor_test.rb", "test/johnson/nodes/export_test.rb", "test/johnson/nodes/for_test.rb", "test/johnson/nodes/function_test.rb", "test/johnson/nodes/if_test.rb", "test/johnson/nodes/import_test.rb", "test/johnson/nodes/label_test.rb", "test/johnson/nodes/let_test.rb", "test/johnson/nodes/object_literal_test.rb", "test/johnson/nodes/return_test.rb", "test/johnson/nodes/semi_test.rb", "test/johnson/nodes/switch_test.rb", "test/johnson/nodes/ternary_test.rb", "test/johnson/nodes/throw_test.rb", "test/johnson/nodes/try_node_test.rb", "test/johnson/nodes/typeof_test.rb", "test/johnson/nodes/unary_node_test.rb", "test/johnson/nodes/void_test.rb", "test/johnson/nodes/while_test.rb", "test/johnson/nodes/with_test.rb", "test/johnson/prelude_test.rb", "test/johnson/runtime_test.rb", "test/johnson/spidermonkey/context_test.rb", "test/johnson/spidermonkey/immutable_node_test.rb", "test/johnson/spidermonkey/js_land_proxy_test.rb", "test/johnson/spidermonkey/ruby_land_proxy_test.rb", "test/johnson/spidermonkey/runtime_test.rb", "test/johnson/version_test.rb", "test/johnson/visitors/dot_visitor_test.rb", "test/johnson/visitors/enumerating_visitor_test.rb", "test/johnson_test.rb", "test/parser_test.rb"]
23
25
 
24
26
  if s.respond_to? :specification_version then
25
27
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
26
28
  s.specification_version = 2
27
29
 
28
- if current_version >= 3 then
30
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
29
31
  s.add_runtime_dependency(%q<rake>, [">= 0"])
30
32
  else
31
33
  s.add_dependency(%q<rake>, [">= 0"])
@@ -8,6 +8,7 @@
8
8
  var window = this;
9
9
 
10
10
  Ruby.require("uri");
11
+ Ruby.require("xml/dom/builder");
11
12
 
12
13
  print = function(txt) { Ruby.puts(txt); };
13
14
 
@@ -138,15 +139,20 @@ print = function(txt) { Ruby.puts(txt); };
138
139
 
139
140
  // DOM Document
140
141
 
141
- window.DOMDocument = function(file){
142
- this._file = file;
143
- var parser = new W3CDOMImplementation();
142
+ var parse = function(text) {
143
+ var parser = new Ruby.XML.DOM.Builder();
144
144
  try {
145
- this._dom = parser.loadXML(file);
145
+ return parser.parse(text);
146
146
  } catch(e) {
147
- Ruby.puts("*** wycats to fix: " + parser.translateErrCode(e.code));
148
- throw parser.translateErrCode(e.code);
147
+ Ruby.puts("FAIL\n" + text);
148
+ Ruby.raise(e)
149
+ Ruby.exit()
149
150
  }
151
+ }
152
+
153
+ window.DOMDocument = function(file){
154
+ this._file = file;
155
+ this._dom = parse(file)
150
156
 
151
157
  if ( !obj_nodes["key?"]( this._dom ) )
152
158
  obj_nodes[this._dom] = this;
@@ -164,15 +170,18 @@ print = function(txt) { Ruby.puts(txt); };
164
170
  getElementsByTagName: function(name){
165
171
  return new DOMNodeList( this._dom.getElementsByTagName(
166
172
  name.toLowerCase()) );
173
+ },
174
+ _cacheIds: function() {
175
+
167
176
  },
168
177
  getElementById: function(id){
169
- return makeNode( this._dom.getElementById(id) );
178
+ return makeNode( this._dom._searchID(id) );
170
179
  },
171
180
  get body(){
172
181
  return this.getElementsByTagName("body")[0];
173
182
  },
174
183
  get documentElement(){
175
- return makeNode( this._dom.getDocumentElement() );
184
+ return makeNode( this._dom.documentElement() );
176
185
  },
177
186
  get ownerDocument(){
178
187
  return null;
@@ -225,14 +234,14 @@ print = function(txt) { Ruby.puts(txt); };
225
234
  };
226
235
 
227
236
  function getDocument(node){
228
- return obj_nodes[node];
237
+ return obj_nodes[node];
229
238
  }
230
239
 
231
240
  // DOM NodeList
232
241
 
233
242
  window.DOMNodeList = function(list){
234
243
  this._dom = list;
235
- this.length = list.getLength();
244
+ this.length = list.length();
236
245
 
237
246
  for ( var i = 0; i < this.length; i++ ) {
238
247
  var node = list.item(i);
@@ -259,31 +268,32 @@ print = function(txt) { Ruby.puts(txt); };
259
268
 
260
269
  DOMNode.prototype = {
261
270
  get nodeType(){
262
- return this._dom.getNodeType();
271
+ return this._dom.nodeType();
263
272
  },
264
273
  get nodeValue(){
265
- return this._dom.getNodeValue();
274
+ return this._dom.nodeValue();
266
275
  },
267
276
  get nodeName() {
268
- return this._dom.getNodeName();
277
+ return this._dom.nodeName();
269
278
  },
270
279
  cloneNode: function(deep){
271
280
  return makeNode( this._dom.cloneNode(deep) );
272
281
  },
273
282
  get ownerDocument(){
274
- return getDocument( this._dom.getOwnerDocument() );
283
+ return getDocument( this._dom.ownerDocument );
284
+ // return getDocument( this._dom.ownerDocument() );
275
285
  },
276
286
  get documentElement(){
277
- return makeNode( this._dom.getDocumentElement() );
287
+ return makeNode( this._dom.documentElement() );
278
288
  },
279
289
  get parentNode() {
280
- return makeNode( this._dom.getParentNode() );
290
+ return makeNode( this._dom.parentNode() );
281
291
  },
282
292
  get nextSibling() {
283
- return makeNode( this._dom.getNextSibling() );
293
+ return makeNode( this._dom.nextSibling() );
284
294
  },
285
295
  get previousSibling() {
286
- return makeNode( this._dom.getPreviousSibling() );
296
+ return makeNode( this._dom.previousSibling() );
287
297
  },
288
298
  toString: function(){
289
299
  return '"' + this.nodeValue + '"';
@@ -317,16 +327,17 @@ print = function(txt) { Ruby.puts(txt); };
317
327
  return this.tagName.toUpperCase();
318
328
  },
319
329
  get tagName(){
320
- return this._dom.getTagName().toUpperCase();
330
+ return this._dom.tagName().toUpperCase();
321
331
  },
322
332
  toString: function(){
323
333
  return "<" + this.tagName + (this.id ? "#" + this.id : "" ) + ">";
324
334
  },
325
335
  get outerHTML(){
326
- var ret = "<" + this.tagName, attr = this.attributes;
336
+ var ret = "<" + this.tagName, attrs = this._dom.attributes();
327
337
 
328
- for ( var i in attr )
329
- ret += " " + i + "='" + attr[i] + "'";
338
+ attrs.each(function(attr) {
339
+ ret += " " + attr.nodeName() + "='" + attr.nodeValue() + "'";
340
+ });
330
341
 
331
342
  if ( this.childNodes.length || this.nodeName == "SCRIPT" )
332
343
  ret += ">" + this.childNodes.outerHTML +
@@ -338,9 +349,9 @@ print = function(txt) { Ruby.puts(txt); };
338
349
  },
339
350
 
340
351
  get attributes(){
341
- var attr = {}, attrs = this._dom.getAttributes();
352
+ var attr = {}, attrs = this._dom.attributes();
342
353
 
343
- for ( var i = 0; i < attrs.getLength(); i++ )
354
+ for ( var i = 0; i < attrs.length(); i++ )
344
355
  attr[ attrs.item(i).nodeName ] = attrs.item(i).nodeValue;
345
356
 
346
357
  return attr;
@@ -354,15 +365,18 @@ print = function(txt) { Ruby.puts(txt); };
354
365
  return m.toLowerCase();
355
366
  });
356
367
 
357
- var nodes = this.ownerDocument.importNode(
358
- new DOMDocument( html ).documentElement, true
359
- ).childNodes;
360
-
368
+ // Ruby.p(this._dom.ownerDocument);
369
+ var frag = parse("<doc>" + html + "</doc>");
370
+
371
+ var nodes = new DOMNodeList(frag.getElementsByTagName("doc")[0].childNodes());
372
+ // new DOMDocument( html ).documentElement.childNodes
373
+
361
374
  while (this.firstChild)
362
375
  this.removeChild( this.firstChild );
363
-
364
- for ( var i = 0; i < nodes.length; i++ )
376
+
377
+ for ( var i = 0; i < nodes.length; i++ ) {
365
378
  this.appendChild( nodes[i] );
379
+ }
366
380
  },
367
381
 
368
382
  get textContent(){
@@ -401,7 +415,11 @@ print = function(txt) { Ruby.puts(txt); };
401
415
  var val = this.getAttribute("checked");
402
416
  return val != "false" && !!val;
403
417
  },
404
- set checked(val) { return this.setAttribute("checked",val); },
418
+ set checked(val) { return this.setAttribute("checked",val.toString()); },
419
+
420
+ get options() {
421
+ return this.getElementsByTagName("options");
422
+ },
405
423
 
406
424
  get selected() {
407
425
  if ( !this._selectDone ) {
@@ -450,9 +468,7 @@ print = function(txt) { Ruby.puts(txt); };
450
468
  set id(val) { return this.setAttribute("id",val); },
451
469
 
452
470
  getAttribute: function(name){
453
- return this._dom.hasAttribute(name) ?
454
- new String( this._dom.getAttribute(name) ) :
455
- null;
471
+ return this._dom.getAttribute(name);
456
472
  },
457
473
  setAttribute: function(name,value){
458
474
  this._dom.setAttribute(name,value);
@@ -462,19 +478,20 @@ print = function(txt) { Ruby.puts(txt); };
462
478
  },
463
479
 
464
480
  get childNodes(){
465
- return new DOMNodeList( this._dom.getChildNodes() );
481
+ return new DOMNodeList( this._dom.childNodes() );
466
482
  },
467
483
  get firstChild(){
468
- return makeNode( this._dom.getFirstChild() );
484
+ return makeNode( this._dom.firstChild() );
469
485
  },
470
486
  get lastChild(){
471
- return makeNode( this._dom.getLastChild() );
487
+ return makeNode( this._dom.lastChild() );
472
488
  },
473
489
  appendChild: function(node){
474
490
  this._dom.appendChild( node._dom );
475
491
  },
476
492
  insertBefore: function(node,before){
477
- this._dom.insertBefore( node._dom, before ? before._dom : before );
493
+ if(!before) return;
494
+ this._dom.insertBefore( node._dom, before._dom );
478
495
  },
479
496
  removeChild: function(node){
480
497
  this._dom.removeChild( node._dom );
@@ -550,12 +567,12 @@ print = function(txt) { Ruby.puts(txt); };
550
567
 
551
568
  function makeNode(node){
552
569
  if ( node ) {
553
- if ( !obj_nodes['key?']( node ) )
554
- obj_nodes[node] = node.getNodeType() ==
555
- W3CDOMNode.ELEMENT_NODE ?
556
- new DOMElement( node ) : new DOMNode( node );
570
+ if ( !obj_nodes['key?']( node.object_id() ) ) {
571
+ obj_nodes[node.object_id()] = node.nodeType() == 1 ?
572
+ new DOMElement( node ) : new DOMNode( node );
573
+ }
557
574
 
558
- return obj_nodes[node];
575
+ return obj_nodes[node.object_id()];
559
576
  } else
560
577
  return null;
561
578
  }