diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-05-22 16:53:35 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2013-05-22 17:05:19 +0200 |
commit | eb2269c1c349b3d0fd8d5fd89c15f08d02f41b1e (patch) | |
tree | 3fa2dafb5a4985c626e6f0b318fa1c5235c88cb5 /tools | |
parent | d1b56de13b82437b9bcb1c49bb9c93b419d51be1 (diff) |
Various fixes
Fix a regression in Script::run, and compilation for
v4 and an auto test.
Change-Id: I4026eebec0e02f4af03ca49ba714916ad90b34e7
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/v4/main.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/v4/main.cpp b/tools/v4/main.cpp index 5529930a99..56ec2da7af 100644 --- a/tools/v4/main.cpp +++ b/tools/v4/main.cpp @@ -57,6 +57,7 @@ #include "private/qv4isel_p.h" #include "private/qv4mm_p.h" #include "private/qv4context_p.h" +#include "private/qv4script_p.h" #ifdef V4_ENABLE_JIT # include "private/qv4isel_masm_p.h" @@ -380,11 +381,9 @@ int main(int argc, char *argv[]) file.close(); try { - QV4::Function *f = QV4::EvalFunction::parseSource(ctx, fn, code, QQmlJS::Codegen::GlobalCode, - /*strictMode =*/ false, /*inheritContext =*/ false); - if (!f) - continue; - QV4::Value result = vm.run(f); + QV4::Script script(ctx, code, fn); + script.parse(); + QV4::Value result = script.run(); if (!result.isUndefined()) { if (! qgetenv("SHOW_EXIT_VALUE").isEmpty()) std::cout << "exit value: " << qPrintable(result.toString(ctx)->toQString()) << std::endl; |