On Wednesday 27 April 2011 02:48:13 ext Caio Marcelo de Oliveira Filho wrote: > Hello qt-scripters :), > > Last days I did some work on the qtquick2-v8 branch of > https://qt.gitorious.org/qt/qt-script-ng. I've tried (as posted in the > qt-qml mailing list) to make QML work without relying on the scope > chain, but Aaron Kennedy pointed out that they tried a similar > approach and got stuck on some cases. The commit > 7f2b679b650c8602f4aca454d1bfa530a415ac73 adds the tests that caused > problem. For now that investigation is "stashed", and what I did here > was make sure that QML could use the scope chain in v8 itself, so we > can move on. > > Note that this branch is from our qt-script-ng repository, but merged > with qtquick2-v8. This is not the approach we announced before, > because we decided to give a shot of implementing QML with the > existing work we had, instead of starting from scratch. Either way, > it's about figuring out what else was missing to get QML running :) > > Here are the patches: > > 1) Improve our v8::Context::GetPrevious, to navigate in the scope > chain. Already reviewed by Olivier, here just for completeness.
r=me again > 2) The scopes were being listed in reverse order, fix that. good > 3) Fix the references to -3, -4 and -5 nodes in scope chain, gave a > name for the first of them to avoid magic numbers all over. > This one enabled many tests to run correctly in tst_qdeclarativeecmascript. It is a bit annoying that we need to change qtdeclarative, but go for it. > 4) Fix a bug in callQtInvokable. The implicit conversion ToNumber was > triggering QDeclarativeObjectScriptClass code in an unexpected context > (so getting evaluation context don't work). > We can provide later a better implementation for valueOf(), but for > now it's fine. same. > > 5) Many tests fail due to error messages missing the filename. Expect > error for unimplemented stuff and also for pushClean() tests that I > think are wrong (I have a fix for master, will get this up tomorrow). why not use QEXPECT_FAIL instead of QSKIP? (or better, find out why the line number are missing) > > > Anyone up for a review? :-) > > > Cheers, _______________________________________________ Qt-script mailing list [email protected] http://lists.qt.nokia.com/mailman/listinfo/qt-script
