| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| |
| |
| |
| |
| |
| | |
git@scm.dev.nokia.troll.no:qt/khansens-qt-script-program into kinetic-declarativeui
Manually merged src/declarative/qml/qmlexpression.cpp
src/script/api/qscriptengine.cpp
src/script/api/qscriptengine.h
|
| |\
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/script/api/qscriptengine.cpp
tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Get rid of QScriptEngine::compile(); you pass arguments to
the QScriptProgram constructor instead. evaluate() will lazily
compile the program the first time it is evaluated, then use the
cached, compiled form on subsequent calls.
|
| | | |
|
| | |
| | |
| | |
| | | |
Introduce helper function evaluateHelper().
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| | |/
| |/|
| | |
| | |
| | |
| | | |
kinetic-declarativeui
Conflicts:
tools/qdoc3/cppcodemarker.cpp
|
| | |
| | |
| | |
| | |
| | |
| | | |
Makes QScriptValue::toNumber() ~50% faster.
Reviewed-by: Olivier Goffart
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Calls to engine() are mostly done for checking that the "source"
and "target" engines are the same, but we don't want those checks
to slow us down. Use an inline getEngine() function instead.
This makes e.g. QScriptValue::call() ~10% faster for a function
like "function(a, b) { return a + b; }".
Reviewed-by: Olivier Goffart
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For non-object values, just return the value immediately; there is no way
that the later check (result.isObject()) will be true anyway.
This makes qScriptValueFromValue() ~50% faster.
Reviewed-by: Olivier Goffart
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Makes creation+destruction of the QScriptValue a lot faster
because it uses the engine's pool of QScriptValuePrivates
instead of qMalloc()/qFree().
Reviewed-by: Olivier Goffart
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Also avoid looking up the object's own properties twice
(before we called getOwnPropertySlot() and then getPropertySlot()
on the same object).
Makes QScriptValue::property() ~20% faster when calling it on an "empty" object.
Reviewed-by: Olivier Goffart
|
| | |
| | |
| | |
| | |
| | |
| | | |
Makes QScriptValue::property() ~10% faster.
Reviewed-by: Olivier Goffart
|
| | |
| | |
| | |
| | |
| | |
| | | |
Makes QScriptContext::engine() 80% faster.
Reviewed-by: Olivier Goffart
|
| | |
| | |
| | |
| | |
| | |
| | | |
Makes QScriptContext::parentContext() 50% faster.
Reviewed-by: Olivier Goffart
|
| | |
| | |
| | |
| | |
| | |
| | | |
Makes QScriptEngine::currentContext() 25% faster.
Reviewed-by: Olivier Goffart
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The idea is that qsreal can be typedef'ed to float on platforms where it's
appropriate. Since the QScriptValue ctor takes a qsreal, we should not
convert it to a double internally.
Reviewed-by: Olivier Goffart
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We must register the same type as they were registered in Qt 4.5
Reported on qt4-preview-feedback mailing list.
Reviewed-by: Kent Hansen
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It appears that simply being in the scope chain of an existant frame
isn't sufficient to be marked. This can lead to a QScriptContext
scope chain that contains a JSObject that has been collected.
For example, this code:
QScriptContext *ctxt = engine->pushContext();
ctxt.pushScope(engine->newObject());
previouslyCreatedFunctionObject.call(); // causes a GC
can lead to the object added to the scope chain to have become
invalid. This leads to hilarity later on.
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | | |
kinetic-declarativeui
Conflicts:
tools/qdoc3/cppcodemarker.cpp
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The QScriptEngine::hasUncaughtException() flag should be set to true if
returning from a JS function was caused by an exception. According to
documentation, the flag had to be accessible from the
QScriptEngineAgent::functionExit event.
New autotest was added.
Reviewed-by: Kent Hansen
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
kinetic-declarativeui
Conflicts:
configure.exe
src/corelib/animation/qabstractanimation.cpp
src/s60installs/qt.iby
util/qlalr/cppgenerator.cpp
|
| |
| |
| |
| | |
Reviewed-by: TrustMe
|
| |
| |
| |
| |
| | |
It's faster than calling getObject(), since getObject() will do
type checking of the value.
|
| |
| |
| |
| | |
Make allocation faster.
|
| |
| |
| |
| | |
Reviewed-by: Olivier Goffart
|
| |
| |
| |
| | |
Reviewed-by: Olivier Goffart
|
|\ \
| |/
| |
| |
| |
| |
| |
| | |
git@scm.dev.nokia.troll.no:qt/kinetic into test
Conflicts:
demos/declarative/samegame/content/samegame.js
tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp
|
| |
| |
| |
| |
| |
| |
| |
| | |
Calling QScriptValue::call doesn't create a fake frame.
We can detect a real fake frame as it does not have a callee.
Task-number: QT-2270
Reviewed-by: Kent Hansen
|
| |
| |
| |
| |
| |
| | |
It's better that this works rather than asserts.
Reviewed-by: Olivier Goffart
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
on 32bit PowerPC, the integer value and the pointer value are not
in the same word leading to crash. So blindly casting between them
lead to crashes.
Use the new Register::withInt instead
Reviewed-by: Kent Hansen
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There is no 'this' register in the global context.
The computation of the this register for the global context
gives the 'codeBlock' register in the frame header.
On Intel processor, a JSValue() is 0x0 when converted to a pointer,
but this is not the case on PowerPC (it is 0xfffffff9) so it just
crash later when acessing the code block.
Solution: special condition for the global context when getting the
'this' object
Reviewed-by: Kent Hansen
|
| |
| |
| |
| |
| |
| | |
jsc-for-qtscript-4.6-staging-05102009 ( 38c2b17366f24220d9ae0456a7cfe2ac78a9f91c )
Adapt src/script to src/3rdparty/javascriptcore changes
|
| | |
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the timeout-checker was not reset, it could take a while
(e.g. 1-2 seconds) before the next timeout occurred, depending on
what the tick counter happened to be after the previous evaluate().
When a processEventsInterval of e.g. 100 milliseconds has been
specified, we want the timeout to happen much sooner, thus we need
to reset the checker. This will cause the first timeout to happen
quickly, and then at steady intervals (processEventsInterval ms)
after that.
The tst_QScriptEngine::processEventsWhileRunning() test was
sporadically failing due to this issue.
Reviewed-by: Olivier Goffart
|
|
|
|
|
|
|
|
| |
Introduced a helper function in our custom source provider,
columnNumberFromOffset(), that maps an absolute offset in the source
input to a relative column number.
Reviewed-by: Jedrzej Nowacki
|
|
|
|
| |
RevBy: Thiago Macieira <thiago.macieira@trolltech.com>
|
|
|
|
|
|
|
| |
Found during API review, make the private safety constructors follow the
pattern of our Q_DISABLE_COPY macro.
Reviewed-by: Robert Griebl
|
|
|
|
|
|
|
|
|
| |
It is possible to call QScriptEngine::pushContext before we start any evaluation.
We need to change JSC so it doesn't always start at the beginning of the stack.
Also fix QScriptContext::pushContext not to waste space between callframes.
Reviewed-by: Kent Hansen
|
|
|
|
|
|
|
|
|
|
| |
I was assuming that the default return value register was always set
to 0 for native calls. But this is not the case. So we must ensure this.
Also be consistend in the way the stackframe grow and shrink. This expose
another bug in the way the call frame is created in JSC
Reviewed-by: Kent Hansen
|
|
|
|
| |
Reviewed-by: Simon Hausmann
|
|
|
|
|
|
|
|
| |
When the script class is set to 0, we need to remove the script
object's delegate entirely, because the delegate requires a non-0
script class in order to be useful.
Reviewed-by: Olivier Goffart
|
|
|
|
|
|
|
| |
The currentFrame pointer is used e.g. by QScriptValue::toString(). It needs to
be in sync, otherwise we will crash.
Reviewed-by: Olivier Goffart
|
|
|
|
|
|
|
|
| |
strictlyEquals has to continue to work if one of the values has an engine
and the other one doesn't. Use the other value's engine to construct a
JSValue if possible and use JSC::JSValue::strictEqual.
Reviewed-by: Kent Hansen
|