| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
script.pro was defining JS_EXPORT in an attempt to avoid exporting,
but JSBase.h unconditionally undefines it, and redefines based on
JS_NO_EXPORT. So define that one instead.
|
|
|
|
| |
Need shims wherever a JSC::Identifier can be created/destroyed.
|
|
|
|
|
|
|
| |
Don't call QVector::append(). We know what the size of the vector
will be, so size it initially and work on QVector::data() directly.
Reviewed-by: Jedrzej Nowacki
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The implementation was getting all the property names
(identifiers) and storing their string representation.
In e.g. value() and setValue(), the string representation
then had to be converted back to an identifier. This was
unnecessary work.
Instead, store the identifiers directly, and use them
via the QScriptValue private API whenever we can.
This greatly improves the performance of scriptName(), value(),
setValue(), flags() and remove().
(tests/benchmarks/script/qscriptvalueiterator is 4-5 times faster.)
Reviewed-by: Jedrzej Nowacki
|
|
|
|
|
|
|
|
| |
Make them mirror the defaults of the public API, so that the
QScriptValuePrivate property functions can be used internally in
the same manner as the public API.
Reviewed-by: Jedrzej Nowacki
|
|
|
|
|
|
|
|
| |
In preparation of being able to call toStringHandle()
directly on a JSC::Identifier in QScriptValueIterator
implementation.
Reviewed-by: Jedrzej Nowacki
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Update qscriptvalueiterator test to expect length property when
iterating arrays and strings.
- Use EvalExecutable::create() instead of EvalExecutable constructor.
The constructor is private.
- Reimplement getOwnPropertyDescriptor() in all custom script objects.
- Remove all reimplementations of getPropertyAttributes().
It doesn't exist in trunk anymore (getOwnPropertyDescriptor() is used
instead).
- Remove checkDontDelete argument from deleteProperty() reimplementations.
The purpose of this argument was to support deleting properties
with attribute Undeletable from C++. But it was quite an invasive
patch to JavaScriptCore, and it doesn't seem worth it. If this feature
is really crucial it should be re-done upstream.
One of the tests needed to be updated so it's not sensitive to the
C++ undeletability.
- Adapt getOwnPropertyNames() reimplementations to signature change.
- Add missing QScriptObject structure flags, otherwise we don't get all virtual calls.
- Remove our patch for reporting column numbers in the debugger callbacks.
It was just too intrusive. As with the checkDontDelete issue, this should
be redone upstream if it's really important. In 4.7, QScriptEngineAgent
will always report a column number of 1.
Other compilation fixes:
- InternalFunction::name() takes an ExecState* argument, not GlobalData*
- ScopeChain::globalObject is no longer a function but a member variable
- ScopeChainNode constructor takes a GlobalObject argument
- Heap::collect() is called collectAllGarbage()
- JSValue::strictEqual() takes an ExecState* argument
- Debugger::exception() takes a bool hasHandler argument
- Debugger no longer reports column number (we decided to drop that patch from JSC)
- UString doesn't have operator+=(char*)
- Update the autotests to reflect the columnNumber=1 change.
- Add helper class to avoid crashing inside JSC.
Ever since r52856 in WebKit trunk, this is needed. There are probably a lot of
other public API functions that need this guard as well, but I'll add them as they
are discovered.
- Update mkdist-javascriptcore tag, exclude a few more files.
- Set ENABLE_JSC_MULTIPLE_THREADS=0 define on Mac due to r52355 in trunk.
Reviewed-by: Simon Hausmann
|
|
|
|
|
|
|
| |
It's only necessary to push a QScriptContext when properties
are read from an object that inherits QScriptable.
Postpone the decision of pushing a context until we know
whether the object is a QScriptable.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The QObject binding uses the function name to determine whether
a meta-method is an overload. This was implemented quite naively
by copying the name from the signature into another array before
comparing it. This could cause several unnecessary memory
allocations, since storing the name is really only needed when
there is an exception (e.g. ambiguous call).
Instead, use strncmp to compare only the relevant characters of
the original (non-copied) method signature.
This makes normal slot invocation from QtScript up to 15% faster.
Reviewed-by: Jedrzej Nowacki
|
|
|
|
|
|
| |
Fixes test tst_QScriptValue::equals(engine->newVariant(QVariant(123)) <=> engine->newArray(10))
Reviewed-by: Jedrzej Nowacki
|
|
|
|
|
|
|
| |
now that QVariant is known to QMetaType, we can test for the metatype id
instead of doing string comparison
Reviewed-by: Kent Hansen
|
|
|
|
|
|
|
|
|
| |
Now that QVariant is known to QMetaType, it has an ID.
This is much more robust as before. This would have fail if QVariant,
would have been registered by the user.
Reviewed-by: Kent Hansen
|
|
|
|
|
|
|
|
|
| |
This conversion needs to be as fast as possible since
it's performed every time you access a QObject property
from QtScript. Hence, we should avoid going via QString
and instead do the conversion ourselves.
Reviewed-by: Jedrzej Nowacki
|
|
|
|
|
|
|
| |
Use JSC::UString internally. Only when the public API demands it
should a JSC::UString be converted to a QString.
Reviewed-by: Jedrzej Nowacki
|
|\
| |
| |
| |
| |
| | |
Conflicts:
qmake/generators/symbian/initprojectdeploy_symbian.cpp
qmake/generators/symbian/symmake_abld.h
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Avoid the engine's list of free script values from growing
without bounds.
When a QScriptValue is initially not bound, its private will
be allocated from the normal heap (and not from the engine's
pool of privates, because there is no engine at this point).
But when a value is later bound (e.g. by setting it as a
property of an object, or by passing it as argument to
QScriptValue::call()) and is subsequently destroyed, its
private will be handed to the engine, which will add it to
its free-list (hence the memory is not freed). This
allocation/deallocation asymmetry causes this list go keep
growing.
The solution is to limit the size of the free-list, and free
the memory of the private immediately when the list has
reached a certain size.
Task-number: QTBUG-8400
Reviewed-by: Olivier Goffart
|
| |
| |
| |
| |
| |
| |
| |
| | |
QScriptValue::isQMetaObject shouldn't crash for a value that internally
is represented as a non JSObjects values.
Additional check was added to QScriptEnginePrivate::isQMetaObject.
Reviewed-by: Kent Hansen
|
| |
| |
| |
| |
| |
| | |
Turn off optimizations in qscriptengine.cpp.
I tried to turn it off/on for a selective few functions,
but without success.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
"e:\pulse\work\91088\src\script\api\qscriptengine.h(360) :
fatal error C1001: An internal error has occurred in the compiler.
(compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c[0x510A0530:0x00000007]', line 243)
To work around this problem, try simplifying or changing the program near the locations listed above."
Apparently the compiler doesn't like that a few functions are inlined.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There's no reason to construct QScriptValues when JSC::JSValues
can be operated on directly. A benchmark showed that ~10% of the
time for reading a QObject property from a script was spent just
creating and destroying QScriptValue temporaries. It's time to
finally get rid of this potential bottleneck, not just in the
QObject integration but everywhere.
This change refactors the code so that all internal operations
are performed on JSC::JSValue (most importantly, conversion
from/to Qt types), and the public API functions are just thin
wrappers around these. E.g. instead of doing
enginePrivate->scriptValueFromJSCValue(jsValue).toQObject()
the implementation now does
QScriptEnginePrivate::toQObject(jsValue)
Other operations are delegated to the engine implementation
in similar style.
Task-number: QTBUG-8304
Reviewed-by: Jedrzej Nowacki
|
| |
| |
| |
| |
| |
| | |
More preparation for operating purely on JSC::JSValue internally.
Reviewed-by: Jedrzej Nowacki
|
| |
| |
| |
| |
| |
| | |
In preparation of operating purely on JSC::JSValue internally.
Reviewed-by: Jedrzej Nowacki
|
| |
| |
| |
| |
| |
| | |
In preparation of doing this conversion in more places.
Reviewed-by: Jedrzej Nowacki
|
| |
| |
| |
| |
| |
| |
| |
| | |
In preparation of getting rid of QScriptValue construction internally;
the implementation should only call the private functions that operate
directly on JSC::JSValues.
Reviewed-by: Jedrzej Nowacki
|
| |
| |
| |
| |
| |
| |
| | |
Also rename ToUint{16,32} to ToUInt{16,32} to follow the Qt
naming (it takes precedence over the ECMA one).
Reviewed-by: Jedrzej Nowacki
|
| |
| |
| |
| |
| |
| |
| | |
These are not dependent on QObject, I don't know how they ended
up inside there.
Reviewed-by: Jedrzej Nowacki
|
| |
| |
| |
| |
| |
| | |
Because that's where they belong.
Reviewed-by: Jedrzej Nowacki
|
| |
| |
| |
| |
| |
| |
| |
| | |
All the public QScriptEngine::create() function does is call the
private implementation anyway, so call QScriptEnginePrivate::create()
directly.
Reviewed-by: Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
git://git-nokia.trolltech.com.au/qtsoftware/qt/kinetic
Conflicts:
src/xmlpatterns/type/qprimitives_p.h
tools/linguist/lupdate/main.cpp
|
| | | |
|
| |\ \
| | |/
| | |
| | |
| | |
| | |
| | | |
kinetic-declarativeui
Conflicts:
tools/linguist/lupdate/main.cpp
|
| |\ \
| | | |
| | | |
| | | |
| | | | |
Conflicts:
src/corelib/kernel/qobject.cpp
|
| |\ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | | |
The QScriptValue does not always have a valid QScriptEngine.
|
| |\ \ \ \
| | | | | |
| | | | | |
| | | | | | |
into kinetic-declarativeui
|
| | |\ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
kinetic-declarativeui
Conflicts:
bin/syncqt
src/corelib/io/qurl.cpp
|
| |/ / / / / |
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This class is essentially the same as QScriptValue, but it is faster
as it doesn't reference objects. Thus, they might be collected
if the gc runs. For return values from QScriptDeclarativeClass this
isn't a problem, of course.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
QScriptDeclarativeClass.
This allows us to pass QObjects to QML-defined functions which expect
a QVariant (and will presumably help in other cases where we expect
transparent QObject <-> QVariant conversion in the engine).
Task-number: QTBUG-6178
Reviewed-by: Aaron Kennedy
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Enable with QML_EXPERIMENTAL=1
|
| | | | | | |
|
| |_|_|_|/
|/| | | |
| | | | |
| | | | |
| | | | | |
Otherwise we crash with latest WebKit trunk because the
SourceProvider is prematurely destructed.
|
| |_|_|/
|/| | |
| | | |
| | | |
| | | | |
Task-number: None, discovering while doing test refactoring
Reviewed-by: Jedrzej Nowacki
|
| |_|/
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We don't want to have to listen to the destroyed() signal for every
receiver object of a connection, and likewise we don't want to create
a QObject to handle each connection; instead, remove the connection
lazily at signal emission time after we've detected that the receiver
has been deleted.
Task-number: QTBUG-7313
Reviewed-by: Simon Hausmann
|
| |/
|/|
| |
| |
| |
| | |
Make it behave the same as the old (4.5) back-end.
Reviewed-by: Jedrzej Nowacki
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (71 commits)
QNAM HTTP Code: Cache socket state inside ensureConnection()
tst_qhttpnetworkconnection: Test also HEAD in some tests
tst_qhttpnetworkconnection: Relax condition in getMultipleWithPriorities
QNAM HTTP Code: When starting new request, prefer connected sockets.
typo fix
Added the 'framecapture' WebKit example to the default build.
Fix code example
fix typo in qreadwritelock's documentation
QNAM HTTP: Don't call d_func() so often
QNAM HTTP: Fix readBuffer maximum size.
QNAM HTTP: Optimize eatWhitespace()
QNAM HTTP: Check if socket already tries to connect.
network internals: fix build on S60
[syncqt] Make -separate-module work with WebKit's directory structure
doc: Corrected explanation of when append() does nothing.
doc: Added clarification about allocating space for the 0 terminator.
Add a way to access the normalised URL in QUrl.
[syncqt] Make it possible to synchronize headers for a separate module
[syncqt] Make it possible to override the base directory
network internals: start HTTP GET requests right away when called
...
|
| |\ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1:
QIODevice: Fix readAll()
Temporary hackiesh solution to prevent BOM in the xml data.
Fixed qxmlstream autotest when using shadow builds.
Attempt at readding the capital P headers for Phonon
Remove special Phonon processing from syncqt.
Use the lowercase/shortname.h headers for Phonon includes
Fixes a crash when setting focus on a widget with a focus proxy.
Update copyright year to 2010
doc: Clarified activeSubControls and subControls.
Remove warning "statement with no effect"
doc: Clarified that .lnk files are System files on Windows.
|
| | | |
| | | |
| | | |
| | | | |
Reviewed-by: Trust Me
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
QScriptDeclarativeClass.
Task-number: QTBUG-6178
Reviewed-by: Kent Hansen
Reviewed-by: Aaron Kennedy
|