therubyracer-freebsd 0.10.1

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.
Files changed (90) hide show
  1. data/.gitignore +13 -0
  2. data/.rspec +1 -0
  3. data/.travis.yml +8 -0
  4. data/.yardopts +1 -0
  5. data/Changelog.md +231 -0
  6. data/Gemfile +3 -0
  7. data/README.md +167 -0
  8. data/Rakefile +26 -0
  9. data/bin/therubyracer +11 -0
  10. data/ext/v8/extconf.rb +26 -0
  11. data/ext/v8/rr.cpp +189 -0
  12. data/ext/v8/rr.h +41 -0
  13. data/ext/v8/v8.cpp +48 -0
  14. data/ext/v8/v8_array.cpp +48 -0
  15. data/ext/v8/v8_array.h +8 -0
  16. data/ext/v8/v8_callbacks.cpp +81 -0
  17. data/ext/v8/v8_callbacks.h +8 -0
  18. data/ext/v8/v8_context.cpp +92 -0
  19. data/ext/v8/v8_context.h +6 -0
  20. data/ext/v8/v8_date.cpp +40 -0
  21. data/ext/v8/v8_date.h +6 -0
  22. data/ext/v8/v8_debug.cpp +17 -0
  23. data/ext/v8/v8_debug.h +6 -0
  24. data/ext/v8/v8_exception.cpp +133 -0
  25. data/ext/v8/v8_exception.h +11 -0
  26. data/ext/v8/v8_external.cpp +70 -0
  27. data/ext/v8/v8_external.h +8 -0
  28. data/ext/v8/v8_function.cpp +69 -0
  29. data/ext/v8/v8_function.h +11 -0
  30. data/ext/v8/v8_handle.cpp +186 -0
  31. data/ext/v8/v8_handle.h +48 -0
  32. data/ext/v8/v8_locker.cpp +139 -0
  33. data/ext/v8/v8_locker.h +6 -0
  34. data/ext/v8/v8_message.cpp +67 -0
  35. data/ext/v8/v8_message.h +10 -0
  36. data/ext/v8/v8_object.cpp +122 -0
  37. data/ext/v8/v8_object.h +10 -0
  38. data/ext/v8/v8_script.cpp +36 -0
  39. data/ext/v8/v8_script.h +8 -0
  40. data/ext/v8/v8_string.cpp +52 -0
  41. data/ext/v8/v8_string.h +9 -0
  42. data/ext/v8/v8_template.cpp +344 -0
  43. data/ext/v8/v8_template.h +8 -0
  44. data/ext/v8/v8_try_catch.cpp +70 -0
  45. data/ext/v8/v8_try_catch.h +5 -0
  46. data/ext/v8/v8_v8.cpp +34 -0
  47. data/ext/v8/v8_v8.h +6 -0
  48. data/ext/v8/v8_value.cpp +175 -0
  49. data/ext/v8/v8_value.h +10 -0
  50. data/ext/v8/v8_weakref.cpp +61 -0
  51. data/ext/v8/v8_weakref.h +29 -0
  52. data/lib/v8.rb +23 -0
  53. data/lib/v8/access.rb +92 -0
  54. data/lib/v8/array.rb +17 -0
  55. data/lib/v8/c/locker.rb +18 -0
  56. data/lib/v8/cli.rb +133 -0
  57. data/lib/v8/context.rb +111 -0
  58. data/lib/v8/error.rb +130 -0
  59. data/lib/v8/function.rb +44 -0
  60. data/lib/v8/object.rb +69 -0
  61. data/lib/v8/portal.rb +86 -0
  62. data/lib/v8/portal/caller.rb +37 -0
  63. data/lib/v8/portal/constructor.rb +98 -0
  64. data/lib/v8/portal/function.rb +63 -0
  65. data/lib/v8/portal/interceptors.rb +152 -0
  66. data/lib/v8/portal/proxies.rb +151 -0
  67. data/lib/v8/portal/templates.rb +73 -0
  68. data/lib/v8/stack.rb +66 -0
  69. data/lib/v8/tap.rb +9 -0
  70. data/lib/v8/version.rb +3 -0
  71. data/spec/ext/array_spec.rb +15 -0
  72. data/spec/ext/cxt_spec.rb +57 -0
  73. data/spec/ext/ext_spec_helper.rb +27 -0
  74. data/spec/ext/func_spec.rb +64 -0
  75. data/spec/ext/object_spec.rb +10 -0
  76. data/spec/ext/string_spec.rb +11 -0
  77. data/spec/ext/try_catch_spec.rb +60 -0
  78. data/spec/redjs_spec.rb +9 -0
  79. data/spec/spec_helper.rb +9 -0
  80. data/spec/v8/error_spec.rb +131 -0
  81. data/spec/v8/portal/proxies_spec.rb +106 -0
  82. data/specmem/handle_memspec.rb +41 -0
  83. data/specmem/object_memspec.rb +14 -0
  84. data/specmem/proxies_memspec.rb +49 -0
  85. data/specmem/spec_helper.rb +24 -0
  86. data/specthread/spec_helper.rb +2 -0
  87. data/specthread/threading_spec.rb +13 -0
  88. data/thefrontside.png +0 -0
  89. data/therubyracer.gemspec +27 -0
  90. metadata +183 -0
@@ -0,0 +1,24 @@
1
+ require Pathname(__FILE__).dirname.join('../spec/spec_helper')
2
+
3
+ module V8::MemSpec
4
+
5
+ def self.included(cls)
6
+ cls.class_eval do
7
+ include V8::ExtSpec
8
+ before(:all) {V8::C::V8::SetFlagsFromString("--expose-gc")}
9
+ end
10
+ end
11
+
12
+ def ruby_gc
13
+ current = GC.stress
14
+ GC.stress = true
15
+ yield
16
+ ensure
17
+ GC.stress = current
18
+ end
19
+
20
+ def v8_gc
21
+ while !c::V8::IdleNotification();end
22
+ v8_eval('gc()', 'gc.js')
23
+ end
24
+ end
@@ -0,0 +1,2 @@
1
+ require Pathname(__FILE__).dirname.join('../spec/spec_helper')
2
+
@@ -0,0 +1,13 @@
1
+
2
+ require 'spec_helper'
3
+
4
+ describe "using v8 from multiple threads" do
5
+
6
+ it "is possible" do
7
+ Thread.new do
8
+ require 'v8'
9
+ V8::Context.new
10
+ end.join
11
+ V8::Context.new
12
+ end
13
+ end
Binary file
@@ -0,0 +1,27 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "v8/version"
4
+ require 'pathname'
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "therubyracer-freebsd"
8
+ s.rubyforge_project = "therubyracer"
9
+ s.summary = "Embed the V8 Javascript interpreter into Ruby"
10
+ s.version = V8::VERSION
11
+ s.authors = ["Charles Lowell", "Bill Robertson"]
12
+ s.description = "Call javascript code and manipulate javascript objects from ruby. Call ruby code and manipulate ruby objects from javascript."
13
+ s.homepage = "http://github.com/cowboyd/therubyracer"
14
+ s.email = "cowboyd@thefrontside.net"
15
+
16
+ root = Pathname(__FILE__).dirname
17
+ s.files = `git ls-files`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
+ s.extensions = ["ext/v8/extconf.rb"]
20
+ s.require_paths = ["lib", "ext"]
21
+
22
+ s.add_dependency "libv8-freebsd", "~> 3.3.10"
23
+
24
+ s.add_development_dependency "rake"
25
+ s.add_development_dependency "rspec", "~> 2.0"
26
+ s.add_development_dependency "rake-compiler"
27
+ end
metadata ADDED
@@ -0,0 +1,183 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: therubyracer-freebsd
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.10.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Charles Lowell
9
+ - Bill Robertson
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2012-06-09 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: libv8-freebsd
17
+ requirement: &70247217313560 !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ~>
21
+ - !ruby/object:Gem::Version
22
+ version: 3.3.10
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: *70247217313560
26
+ - !ruby/object:Gem::Dependency
27
+ name: rake
28
+ requirement: &70247217312860 !ruby/object:Gem::Requirement
29
+ none: false
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: *70247217312860
37
+ - !ruby/object:Gem::Dependency
38
+ name: rspec
39
+ requirement: &70247217311660 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ~>
43
+ - !ruby/object:Gem::Version
44
+ version: '2.0'
45
+ type: :development
46
+ prerelease: false
47
+ version_requirements: *70247217311660
48
+ - !ruby/object:Gem::Dependency
49
+ name: rake-compiler
50
+ requirement: &70247217310960 !ruby/object:Gem::Requirement
51
+ none: false
52
+ requirements:
53
+ - - ! '>='
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ type: :development
57
+ prerelease: false
58
+ version_requirements: *70247217310960
59
+ description: Call javascript code and manipulate javascript objects from ruby. Call
60
+ ruby code and manipulate ruby objects from javascript.
61
+ email: cowboyd@thefrontside.net
62
+ executables:
63
+ - therubyracer
64
+ extensions:
65
+ - ext/v8/extconf.rb
66
+ extra_rdoc_files: []
67
+ files:
68
+ - .gitignore
69
+ - .rspec
70
+ - .travis.yml
71
+ - .yardopts
72
+ - Changelog.md
73
+ - Gemfile
74
+ - README.md
75
+ - Rakefile
76
+ - bin/therubyracer
77
+ - ext/v8/extconf.rb
78
+ - ext/v8/rr.cpp
79
+ - ext/v8/rr.h
80
+ - ext/v8/v8.cpp
81
+ - ext/v8/v8_array.cpp
82
+ - ext/v8/v8_array.h
83
+ - ext/v8/v8_callbacks.cpp
84
+ - ext/v8/v8_callbacks.h
85
+ - ext/v8/v8_context.cpp
86
+ - ext/v8/v8_context.h
87
+ - ext/v8/v8_date.cpp
88
+ - ext/v8/v8_date.h
89
+ - ext/v8/v8_debug.cpp
90
+ - ext/v8/v8_debug.h
91
+ - ext/v8/v8_exception.cpp
92
+ - ext/v8/v8_exception.h
93
+ - ext/v8/v8_external.cpp
94
+ - ext/v8/v8_external.h
95
+ - ext/v8/v8_function.cpp
96
+ - ext/v8/v8_function.h
97
+ - ext/v8/v8_handle.cpp
98
+ - ext/v8/v8_handle.h
99
+ - ext/v8/v8_locker.cpp
100
+ - ext/v8/v8_locker.h
101
+ - ext/v8/v8_message.cpp
102
+ - ext/v8/v8_message.h
103
+ - ext/v8/v8_object.cpp
104
+ - ext/v8/v8_object.h
105
+ - ext/v8/v8_script.cpp
106
+ - ext/v8/v8_script.h
107
+ - ext/v8/v8_string.cpp
108
+ - ext/v8/v8_string.h
109
+ - ext/v8/v8_template.cpp
110
+ - ext/v8/v8_template.h
111
+ - ext/v8/v8_try_catch.cpp
112
+ - ext/v8/v8_try_catch.h
113
+ - ext/v8/v8_v8.cpp
114
+ - ext/v8/v8_v8.h
115
+ - ext/v8/v8_value.cpp
116
+ - ext/v8/v8_value.h
117
+ - ext/v8/v8_weakref.cpp
118
+ - ext/v8/v8_weakref.h
119
+ - lib/v8.rb
120
+ - lib/v8/access.rb
121
+ - lib/v8/array.rb
122
+ - lib/v8/c/locker.rb
123
+ - lib/v8/cli.rb
124
+ - lib/v8/context.rb
125
+ - lib/v8/error.rb
126
+ - lib/v8/function.rb
127
+ - lib/v8/object.rb
128
+ - lib/v8/portal.rb
129
+ - lib/v8/portal/caller.rb
130
+ - lib/v8/portal/constructor.rb
131
+ - lib/v8/portal/function.rb
132
+ - lib/v8/portal/interceptors.rb
133
+ - lib/v8/portal/proxies.rb
134
+ - lib/v8/portal/templates.rb
135
+ - lib/v8/stack.rb
136
+ - lib/v8/tap.rb
137
+ - lib/v8/version.rb
138
+ - spec/ext/array_spec.rb
139
+ - spec/ext/cxt_spec.rb
140
+ - spec/ext/ext_spec_helper.rb
141
+ - spec/ext/func_spec.rb
142
+ - spec/ext/object_spec.rb
143
+ - spec/ext/string_spec.rb
144
+ - spec/ext/try_catch_spec.rb
145
+ - spec/redjs_spec.rb
146
+ - spec/spec_helper.rb
147
+ - spec/v8/error_spec.rb
148
+ - spec/v8/portal/proxies_spec.rb
149
+ - specmem/handle_memspec.rb
150
+ - specmem/object_memspec.rb
151
+ - specmem/proxies_memspec.rb
152
+ - specmem/spec_helper.rb
153
+ - specthread/spec_helper.rb
154
+ - specthread/threading_spec.rb
155
+ - thefrontside.png
156
+ - therubyracer.gemspec
157
+ homepage: http://github.com/cowboyd/therubyracer
158
+ licenses: []
159
+ post_install_message:
160
+ rdoc_options: []
161
+ require_paths:
162
+ - lib
163
+ - ext
164
+ required_ruby_version: !ruby/object:Gem::Requirement
165
+ none: false
166
+ requirements:
167
+ - - ! '>='
168
+ - !ruby/object:Gem::Version
169
+ version: '0'
170
+ required_rubygems_version: !ruby/object:Gem::Requirement
171
+ none: false
172
+ requirements:
173
+ - - ! '>='
174
+ - !ruby/object:Gem::Version
175
+ version: '0'
176
+ requirements: []
177
+ rubyforge_project: therubyracer
178
+ rubygems_version: 1.8.11
179
+ signing_key:
180
+ specification_version: 3
181
+ summary: Embed the V8 Javascript interpreter into Ruby
182
+ test_files: []
183
+ has_rdoc: