Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Upgrade to v8 4.5, move towards 1.0 release #348

Open
wants to merge 136 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
2fca33f
Remove old ext files and spec & link to the new V8
georgyangelov Mar 18, 2015
1f7192c
Add ability to create handle scopes
georgyangelov Mar 18, 2015
d1e9088
Port a ton of the original ext classes
georgyangelov Mar 20, 2015
cf5c732
Remove a TODO about the disposal of weak persistent handles
georgyangelov Mar 20, 2015
d0f568c
Add strings and some conversion options for values
georgyangelov Mar 21, 2015
143bbb1
Add tests for V8::C::Value
georgyangelov Mar 21, 2015
207158f
Add Locker and Unlocker
georgyangelov Mar 21, 2015
7f48722
Dispose of the persistent handles when they are GC'd by ruby
georgyangelov Mar 22, 2015
a926860
Lock inside the C methods and store isolate with every ref
georgyangelov Apr 4, 2015
52e52c1
Remove #Enter, #Exit and ::GetCurrent from C::Isolate
georgyangelov Apr 4, 2015
acf9be1
Implement Function and Script
georgyangelov Apr 4, 2015
93ae00c
Add Array
georgyangelov Apr 5, 2015
d1009c1
document the primitive equivalence classes
cowboyd Jun 29, 2015
902a6f2
add documentation for pointer class
cowboyd Jun 30, 2015
e452e12
add mode comments, fix indentation
cowboyd Jun 30, 2015
b11e514
upgrade to 4.5.x, add isolate.Dispose()
cowboyd Jul 4, 2015
1fac021
setup and teardown IsolateData with each Isolate
cowboyd Jul 5, 2015
b8ba4c4
Context#Dispose() is not a thing in v8 4.5
cowboyd Jul 5, 2015
38229de
add reference queing and dequeinc
cowboyd Jul 6, 2015
6cda380
remove errant fprintf()
cowboyd Jul 6, 2015
963c93f
add documentation for `clearReferences` method
cowboyd Jul 6, 2015
4b7edae
don't create handle scope in context creation
cowboyd Jul 6, 2015
369b0d3
Merge pull request #1 from stormbreakerbg/isolate-reference-queue
cowboyd Jul 6, 2015
a91f59d
retain and release ruby objects
cowboyd Jul 6, 2015
01033ce
rename queue -> v8_release_queue
cowboyd Jul 6, 2015
0fd81d5
rename release_queue -> rb_release_queue
cowboyd Jul 6, 2015
ca2bf2a
add documentation for the GC system
cowboyd Jul 6, 2015
dfb0a3c
more documentation on external
cowboyd Jul 6, 2015
4ba45ba
add docs for ruby_release_queue
cowboyd Jul 6, 2015
fd61cb8
Merge pull request #2 from stormbreakerbg/managed-external-objects
stormbreakerbg Jul 6, 2015
ed982f0
make external fully integrated
cowboyd Jul 8, 2015
a172288
add ScriptOrigin and round out Function
cowboyd Jul 9, 2015
6d667fd
Merge pull request #3 from stormbreakerbg/implement-script-origin
stormbreakerbg Jul 9, 2015
7fee981
add support for Symbols
cowboyd Jul 11, 2015
38af541
coordinate shared datastructure teardown
cowboyd Jul 11, 2015
ed089f2
Merge pull request #6 from stormbreakerbg/symbol-support
stormbreakerbg Jul 11, 2015
ef23f6a
only run C spec compiled with Clang
cowboyd Jul 12, 2015
bc6668a
allow failures on older versions of ruby.
cowboyd Jul 12, 2015
e82006e
use clang for CC too?
cowboyd Jul 12, 2015
bd88a6c
install modern g++ and clang befondhand
cowboyd Jul 12, 2015
e58b7aa
let travis set the compiler, don't override the install
cowboyd Jul 12, 2015
c4b6a5c
attempt with just gcc-4.8
cowboyd Jul 12, 2015
ea4cd3b
still have some command lines to debug, so lets try clang
cowboyd Jul 12, 2015
2a5bf75
what versions do we have anyhow?
cowboyd Jul 12, 2015
73dce99
print some docs
cowboyd Jul 12, 2015
f13b23b
print out contents of CXX and CC
cowboyd Jul 12, 2015
31043be
properly use shell variables
cowboyd Jul 12, 2015
78f507a
environment variables are not being set, hardcode for now
cowboyd Jul 12, 2015
e1fbdb4
allow using a custom compiler
cowboyd Jul 12, 2015
d18f479
Don't hardcode g++ into build
cowboyd Jul 12, 2015
51c13d1
disable bundler cache that contains yanked gems
cowboyd Jul 12, 2015
6f55073
remove extra space
cowboyd Jul 12, 2015
3f1bde0
rbx: not to big to fail.
cowboyd Jul 13, 2015
d1dd01d
Merge pull request #355 from cowboyd/limit-specs-to-c-and-clang
cowboyd Jul 13, 2015
82db08d
add ignores for gnu global artifacts
cowboyd Jul 13, 2015
0681a98
add ability to define a callback for a JS Function
cowboyd Jul 16, 2015
b9bbbec
add documentation for wrapper class
cowboyd Jul 16, 2015
c6c9bc3
remove obsolete declaration
cowboyd Jul 16, 2015
3792d74
extract ReturnValue into its own file
cowboyd Jul 16, 2015
638f6ea
add docs to the function callback
cowboyd Jul 16, 2015
0ddf0be
Merge remote-tracking branch 'origin/upgrade-to-v8-4.5' into coordina…
cowboyd Jul 16, 2015
cbfb1b1
support Maybe APIs
cowboyd Jul 17, 2015
8cf68e3
Merge pull request #363 from cowboyd/coordinate-isolate-teardown
cowboyd Jul 17, 2015
d5e26af
Merge pull request #357 from cowboyd/ignore-gnu-global-artifacts
cowboyd Jul 17, 2015
03f2f28
[WIP] - store changes
cowboyd Jul 17, 2015
75823c1
Merge pull request #364 from cowboyd/4.5/ruby-maybe-values
cowboyd Jul 17, 2015
30dc90d
implement JavaScript numeric types
cowboyd Jul 10, 2015
34804a9
add deprecation TODO
cowboyd Jul 10, 2015
18c0775
remove c++11 features
cowboyd Jul 14, 2015
712ad93
remove hacks around number usage
cowboyd Jul 14, 2015
0e4d915
return specific subtypes of integer in constructor
cowboyd Jul 17, 2015
7fc20dc
resolve merge conflicts
cowboyd Jul 17, 2015
0235696
Merge pull request #353 from cowboyd/implement-numbers
cowboyd Jul 17, 2015
9ab2d8b
Merge pull request #362 from cowboyd/ruby-defined-function-callbacks
cowboyd Jul 17, 2015
99f9ad3
Merge branch 'upgrade-to-v8-4.5' of github.com:cowboyd/therubyracer i…
cowboyd Jul 17, 2015
5ca52d5
remove backref code.
cowboyd Jul 18, 2015
4e880b1
add support for NewInstance()
cowboyd Jul 18, 2015
5d09e42
implement ObjectTemplte#Set()
cowboyd Jul 18, 2015
e704d73
add FunctionTemplate#{New,GetFunction}
cowboyd Jul 19, 2015
f5b5644
supply a function callback to function template
cowboyd Jul 19, 2015
6331efc
Merge pull request #365 from cowboyd/4.5/remove-backref
cowboyd Jul 19, 2015
949f4db
remove Empty value.
cowboyd Jul 19, 2015
11a3530
noramize value thunking
cowboyd Jul 20, 2015
4f9137c
Merge remote-tracking branch 'origin/upgrade-to-v8-4.5' into 4.5/obje…
cowboyd Jul 21, 2015
905037e
Merge pull request #368 from cowboyd/4.5/value-cleanup
cowboyd Jul 21, 2015
0c9acc1
Merge remote-tracking branch 'origin/upgrade-to-v8-4.5' into 4.5/obje…
cowboyd Jul 21, 2015
07352d6
Implement Object.SetAccessor, Has and Delete
georgyangelov Jul 16, 2015
ac1d0e0
Fix the required number of arguments for the SetAccessor method
georgyangelov Jul 19, 2015
de7b0f5
Use a constructor for Enum conversion from Ruby values
georgyangelov Jul 19, 2015
45ddb40
Use template for PropertyCallbackInfo
georgyangelov Jul 20, 2015
19438dd
Namespace the PropertyCallbackInfo classes
georgyangelov Jul 21, 2015
7491cc6
Add return value to PropertyCallbackInfo<void>
georgyangelov Jul 21, 2015
60f6069
Move object wrapping for Object callbacks to a separate class
georgyangelov Jul 21, 2015
e1c8f9e
compile scripts via maybe apis
cowboyd Jul 22, 2015
46713f8
adjust function_spec to use maybe apis
cowboyd Jul 22, 2015
38caf7e
Move the set methods to the base class of ReturnValue
georgyangelov Jul 22, 2015
8b66c34
remove redundant template parameters
cowboyd Jul 23, 2015
da152e3
Merge pull request #369 from cowboyd/4.5/script-compile-with-origin
cowboyd Jul 23, 2015
78ac679
add back simple evaluation specs
cowboyd Jul 23, 2015
d969b1c
add back the basics of memory testing.
cowboyd Jul 28, 2015
d9f7042
Merge pull request #370 from cowboyd/4.5/start-implementing-context-s…
cowboyd Jul 28, 2015
5e21f1d
remove calls to Dispose in specs
cowboyd Jul 28, 2015
78c841c
Merge pull request #371 from cowboyd/4.5/add-memory-testing
cowboyd Jul 28, 2015
277926f
implement passing objects from JS -> Ruby
cowboyd Jul 28, 2015
7c293f0
add conversion for fixnum
cowboyd Jul 29, 2015
f014899
Merge pull request #366 from cowboyd/4.5/object-template
cowboyd Jul 29, 2015
2e59b4e
Merge pull request #372 from cowboyd/4.5/js-objects-to-high-level-api
cowboyd Jul 29, 2015
c53027c
remove obsolete enums
cowboyd Jul 29, 2015
1bd5c3b
implement date and related conversions
cowboyd Jul 30, 2015
213c619
add back in the memory map + documentation
cowboyd Jul 31, 2015
3727570
Merge pull request #373 from cowboyd/4.5/primitive-conversions
cowboyd Jul 31, 2015
288ae8c
Merge branch 'upgrade-to-v8-4.5' of github.com:cowboyd/therubyracer i…
cowboyd Jul 31, 2015
7fc1ebd
enable calling JS code from Ruby
cowboyd Jul 31, 2015
39a6cd6
Merge pull request #374 from cowboyd/4.5/referential-integrity
cowboyd Jul 31, 2015
81d9981
Merge branch 'upgrade-to-v8-4.5' of github.com:cowboyd/therubyracer i…
cowboyd Jul 31, 2015
bafd35c
Merge pull request #375 from cowboyd/4.5/call-js-code-from-ruby
cowboyd Jul 31, 2015
f24985c
Add rspec matchers for Maybe and (Strict)?Equals
georgyangelov Aug 1, 2015
7f6c40f
Add `Object::CreateDataProperty`
georgyangelov Aug 1, 2015
dd7b049
Add Object::DefineOwnProperty
georgyangelov Aug 1, 2015
a018c34
Add Object::GetPropertyAttributes
georgyangelov Aug 1, 2015
21c35c6
Add Object::GetOwnPropertyAccessor
georgyangelov Aug 1, 2015
1cfbe81
Implement Object::SetAccessorProperty
georgyangelov Aug 1, 2015
397a47f
Add Object::Get(Own)PropertyNames
georgyangelov Aug 2, 2015
d849799
Add Object::GetPrototype and Object::SetPrototype
georgyangelov Aug 2, 2015
200d617
Add Object::ObjectProtoToString
georgyangelov Aug 2, 2015
5ac3483
Implement the rest of the Object mehods:
georgyangelov Aug 2, 2015
d4c68df
Merge branch 'stormbreakerbg-4.5/object-methods' into upgrade-to-v8-4.5
cowboyd Aug 10, 2015
2c0b979
add support for TryCatch along with StackTrace
cowboyd Aug 12, 2015
c9b43ff
Throw JavaScript exceptions from Ruby
cowboyd Aug 12, 2015
250b8e7
Embed lambdas and procs into V8::Context
cowboyd Aug 12, 2015
3d5516a
finish out the Array C API
cowboyd Aug 12, 2015
1fa84a0
Merge pull request #381 from cowboyd/4.5/finish-array-c-api
cowboyd Aug 13, 2015
e567976
Merge pull request #380 from cowboyd/4.5/embed-lambdas-into-javascript
cowboyd Aug 13, 2015
5a1632a
Merge pull request #379 from cowboyd/4.5/try-catch-throw
cowboyd Aug 13, 2015
b29c94f
add pre-emption APIS
cowboyd Aug 14, 2015
b8445ae
Merge pull request #382 from cowboyd/4.5/preemption
cowboyd Aug 28, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ spec/reports
test/tmp
test/version_tmp
tmp
/GPATH
/GRTAGS
/GTAGS
25 changes: 23 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,35 @@
cache: bundler
#cache: bundler
rvm:
- 2.1.0
- 2.0.0
- 1.9.3
- 1.9.2
- 1.8.7
- rbx-2.2.3
matrix:
allow_failures:
- rvm: 1.9.3
- rvm: 1.9.2
- rvm: 1.8.7
- rvm: rbx-2.2.3
env:
- CXX=g++-4.8
- CXX=clang++
notifications:
recipients:
- [email protected]
before_install:
- gem update --system 2.1.11
script: bundle exec rake compile spec
script:
- bundle exec rake compile
- bundle exec rspec spec/c spec/v8/context_spec.rb spec/v8/isolate_spec.rb
- bundle exec rspec spec/mem
sudo: false
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-4.8
- g++-4.8
- clang
5 changes: 5 additions & 0 deletions ext/v8/.dir-locals.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
;;; Directory Local Variables
;;; For more information see (info "(emacs) Directory Variables")

((c++-mode
(c-basic-offset . 2)))
181 changes: 0 additions & 181 deletions ext/v8/accessor.cc

This file was deleted.

50 changes: 32 additions & 18 deletions ext/v8/array.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,39 @@

namespace rr {

void Array::Init() {
ClassBuilder("Array", Object::Class).
defineSingletonMethod("New", &New).
defineMethod("Length", &Length).
defineMethod("CloneElementAt", &CloneElementAt).
store(&Class);
}
void Array::Init() {
ClassBuilder("Array", Object::Class).

VALUE Array::New(int argc, VALUE argv[], VALUE self) {
VALUE length; rb_scan_args(argc, argv, "01", &length);
return Array(v8::Array::New(RTEST(length) ? NUM2INT(length) : 0));
}
defineSingletonMethod("New", &New).

VALUE Array::Length(VALUE self) {
return UInt32(Array(self)->Length());
}
defineMethod("Length", &Length).
defineMethod("CloneElementAt", &CloneElementAt).

VALUE Array::CloneElementAt(VALUE self, VALUE index) {
return Object(Array(self)->CloneElementAt(UInt32(index)));
}
store(&Class);
}

VALUE Array::New(int argc, VALUE argv[], VALUE self) {
VALUE rb_isolate, length;
rb_scan_args(argc, argv, "11", &rb_isolate, &length);

Isolate isolate(rb_isolate);
Locker lock(isolate);

}
return Array(isolate, v8::Array::New(isolate, RTEST(length) ? NUM2INT(length) : 0));
}

VALUE Array::Length(VALUE self) {
Array array(self);
Locker lock(array);

return Uint32_t(array->Length());
}

VALUE Array::CloneElementAt(VALUE self, VALUE context, VALUE index) {
Array array(self);
Locker lock(array);

return Object::Maybe(array.getIsolate(), array->CloneElementAt(Context(context), Uint32_t(index)));
}

}
22 changes: 22 additions & 0 deletions ext/v8/array.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#ifndef RR_ARRAY
#define RR_ARRAY

namespace rr {

class Array : public Ref<v8::Array> {
public:
static void Init();

static VALUE New(int argc, VALUE argv[], VALUE self);
static VALUE Length(VALUE self);
static VALUE CloneElementAt(VALUE self, VALUE context, VALUE index);

inline Array(v8::Isolate* isolate, v8::Handle<v8::Array> array) : Ref<v8::Array>(isolate, array) {}
inline Array(VALUE value) : Ref<v8::Array>(value) {}

typedef MaybeLocal<Array, v8::Array> Maybe;
};

}

#endif
45 changes: 0 additions & 45 deletions ext/v8/backref.cc

This file was deleted.

Loading