mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of github.com:triAGENS/ArangoDB into devel
This commit is contained in:
commit
1d468135a8
|
@ -44,10 +44,9 @@ using namespace triagens::aql;
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
V8Expression::V8Expression (v8::Isolate* isolate,
|
V8Expression::V8Expression (v8::Isolate* isolate,
|
||||||
v8::Persistent<v8::Function> func)
|
v8::Persistent<v8::Function> func)
|
||||||
: isolate(isolate),
|
: isolate(isolate),
|
||||||
func(func) {
|
func(func) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -76,8 +75,8 @@ AqlValue V8Expression::execute (triagens::arango::AqlTransaction* trx,
|
||||||
size_t const n = vars.size();
|
size_t const n = vars.size();
|
||||||
TRI_ASSERT(regs.size() == n); // assert same vector length
|
TRI_ASSERT(regs.size() == n); // assert same vector length
|
||||||
|
|
||||||
// TODO: only convert those variables to V8 that are actually used in the expression
|
|
||||||
v8::Handle<v8::Object> values = v8::Object::New();
|
v8::Handle<v8::Object> values = v8::Object::New();
|
||||||
|
|
||||||
for (size_t i = 0; i < n; ++i) {
|
for (size_t i = 0; i < n; ++i) {
|
||||||
auto varname = vars[i]->name;
|
auto varname = vars[i]->name;
|
||||||
auto reg = regs[i];
|
auto reg = regs[i];
|
||||||
|
|
|
@ -82,10 +82,18 @@ namespace triagens {
|
||||||
// --SECTION-- public variables
|
// --SECTION-- public variables
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
v8::Isolate* isolate;
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// @brief the isolate used when executing and destroying the expression
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
v8::Isolate* isolate;
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// @brief the compiled expression as a V8 function
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
v8::Persistent<v8::Function> func;
|
||||||
|
|
||||||
v8::Persistent<v8::Function> func;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue