Hi everybody:

I am building a bson like library (bjason), and I would like encode/decode 
functions.

Bson allow en/decode code and its scope, but I don't know to get the code 
nor scope.

Well, code is easy, with ToString(), but in others examples (mainly from 
mongodb code) it seems that code and scope is extracted using Get(code_sym) 
and Get(scope_sym) over the Object, with code and scope_sym persistent 
handles to "code" and "scope".

For example: 
https://github.com/akdubya/BSON.js/blob/fed4678b32557199570d0af0d850bff65943eefe/src/encode.cc
 line 
91

Can anybody explain me this?

By the way, is it possible to get the scope of a function? that is, 
bindings done?

For example:

var a=1;

var fx=function(v) { return v+a; }

The scope of fx is: { a }, am I wrong?

Thanks in advance.

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to