rubyjs / therubyracer

Embed the V8 Javascript Interpreter into Ruby
1.67k stars 190 forks source link

Implement Object API #377

Closed georgyangelov closed 8 years ago

georgyangelov commented 8 years ago

In this branch I put the Object method implementations.

Currently implemented:

Also, I added a few RSpec matchers for a more convenient use of Maybe instances:

georgyangelov commented 8 years ago

I think that's all of them. Should be ready for review :smiley:

cowboyd commented 8 years ago

Awesome, so excited to review this!

cowboyd commented 8 years ago

This looks really solid. I'm curious about the dereference issue, but not enough to hold it up!

georgyangelov commented 8 years ago

They shouldn't be needed. Don't really know what I was thinking :)

cowboyd commented 8 years ago

Actually, I tried removing them, and it was getting confused between the methods that had name keys, and the integer keys, probably because of operator VALUE(). My guess is that VALUE can be constructed from an int32_t and so it doesn't know whether, for the Name object, to convert to VALUE or v8::Local<v8::Name> (just a guess)

I'm trying to tackle exception handling and v8::TryCatch and v8::StackTrace. Any chance you could look at finishing out Template, ObjectTemplate and FunctionTemplate. With those out of the way, we should have everything we need from the C api to get the entire test suite passing again.

georgyangelov commented 8 years ago

I will look at the templates.