From d67a60c2231b1233b0ef1d285e8c5801faae1089 Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Wed, 29 Oct 2014 12:14:14 +0100 Subject: [PATCH] removed TODO --- arangod/Aql/V8Expression.cpp | 5 ++--- arangod/Aql/V8Expression.h | 14 +++++++++++--- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/arangod/Aql/V8Expression.cpp b/arangod/Aql/V8Expression.cpp index ac5b53520b..a9141b1fbd 100644 --- a/arangod/Aql/V8Expression.cpp +++ b/arangod/Aql/V8Expression.cpp @@ -44,10 +44,9 @@ using namespace triagens::aql; //////////////////////////////////////////////////////////////////////////////// V8Expression::V8Expression (v8::Isolate* isolate, - v8::Persistent func) + v8::Persistent func) : isolate(isolate), func(func) { - } //////////////////////////////////////////////////////////////////////////////// @@ -76,8 +75,8 @@ AqlValue V8Expression::execute (triagens::arango::AqlTransaction* trx, size_t const n = vars.size(); 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 values = v8::Object::New(); + for (size_t i = 0; i < n; ++i) { auto varname = vars[i]->name; auto reg = regs[i]; diff --git a/arangod/Aql/V8Expression.h b/arangod/Aql/V8Expression.h index 9dd29fe889..a284cf90f7 100644 --- a/arangod/Aql/V8Expression.h +++ b/arangod/Aql/V8Expression.h @@ -82,10 +82,18 @@ namespace triagens { // --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 func; - v8::Persistent func; - }; }