summaryrefslogtreecommitdiffstats
path: root/src/script
Commit message (Collapse)AuthorAgeFilesLines
* Update tech preview license header for files that are new in 4.6.Jason McDonald2009-08-3126-338/+338
| | | | Reviewed-by: Trust Me
* Merge branch '4.5' into 4.6Thiago Macieira2009-08-3133-442/+455
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/boxes/glshaders.cpp demos/boxes/vector.h demos/embedded/fluidlauncher/pictureflow.cpp demos/embedded/fluidlauncher/pictureflow.h doc/src/desktop-integration.qdoc doc/src/distributingqt.qdoc doc/src/examples-overview.qdoc doc/src/examples.qdoc doc/src/frameworks-technologies/dbus-adaptors.qdoc doc/src/geometry.qdoc doc/src/groups.qdoc doc/src/objecttrees.qdoc doc/src/platform-notes.qdoc doc/src/plugins-howto.qdoc doc/src/qt3support.qdoc doc/src/qtdbus.qdoc doc/src/qtdesigner.qdoc doc/src/qtgui.qdoc doc/src/qtmain.qdoc doc/src/qtopengl.qdoc doc/src/qtsvg.qdoc doc/src/qtuiloader.qdoc doc/src/qundo.qdoc doc/src/richtext.qdoc doc/src/topics.qdoc src/corelib/tools/qdumper.cpp src/gui/embedded/qkbdpc101_qws.cpp src/gui/embedded/qkbdsl5000_qws.cpp src/gui/embedded/qkbdusb_qws.cpp src/gui/embedded/qkbdvr41xx_qws.cpp src/gui/embedded/qkbdyopy_qws.cpp src/gui/embedded/qmousebus_qws.cpp src/gui/embedded/qmousevr41xx_qws.cpp src/gui/embedded/qmouseyopy_qws.cpp src/gui/painting/qpaintengine_d3d.cpp src/gui/painting/qwindowsurface_d3d.cpp src/opengl/gl2paintengineex/glgc_shader_source.h src/opengl/gl2paintengineex/qglpexshadermanager.cpp src/opengl/gl2paintengineex/qglpexshadermanager_p.h src/opengl/gl2paintengineex/qglshader.cpp src/opengl/gl2paintengineex/qglshader_p.h src/opengl/util/fragmentprograms_p.h src/plugins/kbddrivers/linuxis/linuxiskbdhandler.cpp src/plugins/mousedrivers/linuxis/linuxismousehandler.cpp src/script/parser/qscript.g src/script/qscriptarray_p.h src/script/qscriptasm_p.h src/script/qscriptbuffer_p.h src/script/qscriptclass.cpp src/script/qscriptclassdata_p.h src/script/qscriptcompiler.cpp src/script/qscriptcompiler_p.h src/script/qscriptcontext.cpp src/script/qscriptcontext_p.cpp src/script/qscriptcontext_p.h src/script/qscriptcontextfwd_p.h src/script/qscriptecmaarray.cpp src/script/qscriptecmaarray_p.h src/script/qscriptecmaboolean.cpp src/script/qscriptecmacore.cpp src/script/qscriptecmadate.cpp src/script/qscriptecmadate_p.h src/script/qscriptecmaerror.cpp src/script/qscriptecmaerror_p.h src/script/qscriptecmafunction.cpp src/script/qscriptecmafunction_p.h src/script/qscriptecmaglobal.cpp src/script/qscriptecmaglobal_p.h src/script/qscriptecmamath.cpp src/script/qscriptecmamath_p.h src/script/qscriptecmanumber.cpp src/script/qscriptecmanumber_p.h src/script/qscriptecmaobject.cpp src/script/qscriptecmaobject_p.h src/script/qscriptecmaregexp.cpp src/script/qscriptecmaregexp_p.h src/script/qscriptecmastring.cpp src/script/qscriptecmastring_p.h src/script/qscriptengine.cpp src/script/qscriptengine_p.cpp src/script/qscriptengine_p.h src/script/qscriptenginefwd_p.h src/script/qscriptextenumeration.cpp src/script/qscriptextenumeration_p.h src/script/qscriptextqobject.cpp src/script/qscriptextqobject_p.h src/script/qscriptextvariant.cpp src/script/qscriptfunction.cpp src/script/qscriptfunction_p.h src/script/qscriptgc_p.h src/script/qscriptmember_p.h src/script/qscriptobject_p.h src/script/qscriptprettypretty.cpp src/script/qscriptprettypretty_p.h src/script/qscriptvalue.cpp src/script/qscriptvalueimpl.cpp src/script/qscriptvalueimpl_p.h src/script/qscriptvalueimplfwd_p.h src/script/qscriptvalueiteratorimpl.cpp src/script/qscriptxmlgenerator.cpp src/script/qscriptxmlgenerator_p.h tests/auto/linguist/lupdate/testdata/recursivescan/project.ui tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp tools/linguist/shared/cpp.cpp
| * Update tech preview license header.Jason McDonald2009-08-31114-1508/+1508
| | | | | | | | Reviewed-by: Trust Me
| * Update license headers.Jason McDonald2009-08-11114-116/+116
| | | | | | | | Reviewed-by: Trust Me
* | fix crash due to double deletionKent Hansen2009-08-311-1/+0
| | | | | | | | Needed due to commit 3636e666528b72de79f8c7012690bb9e279f0863
* | don't disable the JIT for qtscriptKent Hansen2009-08-311-2/+0
| | | | | | | | AKA, enable it on platforms where it's supported.
* | make sure hasInstance() is always invoked for custom script objectsKent Hansen2009-08-311-1/+1
| | | | | | | | | | | | | | Need to specify the OverridesHasInstance flag, otherwise the JIT will do the standard hasInstance implementation instead of calling our virtual function. This makes the QScriptClass::extension() autotest pass.
* | implement functionExit() callbacks on the JITKent Hansen2009-08-312-6/+12
| | | | | | | | | | | | The return value is not reported (we need a separate callback for that, just like in the interpreter), but that isn't important to get our tools (i.e. the debugger) working.
* | Make it possible for autotests to check if JIT is enabled or notKent Hansen2009-08-281-0/+11
| | | | | | | | | | | | Currently there are some differences in behavior and availability of information between the interpreter and the JIT. This is now documented as expected failures in the relevant autotests.
* | doc: Fixed several qdoc errors.Martin Smith2009-08-281-1/+1
| |
* | QScriptContextInfo: fix the line numbers with JITOlivier Goffart2009-08-281-3/+11
| | | | | | | | It even works better than with the interpreter
* | QScriptEngine: Remove one superflous stackframe for native call made by JITOlivier Goffart2009-08-281-1/+7
| | | | | | | | | | | | | | JIT does create stackframe while the interperer doesn't. So we would end up with one superflous stackframe Reviewed-by: Kent Hansen
* | fix compiler warnings on WindowsKent Hansen2009-08-271-2/+2
| | | | | | | | "*/ outside of comment"
* | disable a few compiler warnings for qtscript/JavaScriptCore on WindowsKent Hansen2009-08-271-0/+3
| | | | | | | | | | | | | | | | We do it when compiling JavaScriptCore as part of QtWebKit, so do it when compiling it as part of QtScript as well, otherwise the excess warning output is just ridiculous. Adopted from patch at https://bugs.webkit.org/show_bug.cgi?id=27709
* | fix whacky behavior of QScriptValue::toString() for QVariantKent Hansen2009-08-271-1/+1
| | | | | | | | | | | | | | | | For some types, an empty string is the correct and complete conversion of the type. If the result is an empty string, use QVariant::canConvert() to determine if that is indeed correct, before falling back to the "string-conversion-not-available" path.
* | warn if QScriptValue::setScriptClass() is called on incompatible objectKent Hansen2009-08-261-1/+6
| |
* | don't crash when attempting to access properties of a JS Object that ↵Kent Hansen2009-08-262-24/+29
| | | | | | | | | | | | | | | | | | | | | | belonged to a deleted script engine When the engine is deleted, the JSValue is invalidated, but the QScriptValue's type will still be QScriptValuePrivate::JSC. Use a new helper function, isObject(), that checks both that the value is of type JSC _and_ that it is valid, before calling JSValue::isObject() (JSValue::isObject() assumes that the value is valid).
* | fix performance issue with QScriptValue::propertyFlags()Kent Hansen2009-08-262-28/+39
| | | | | | | | | | | | | | Calling QScriptEngine::toStringHandle() is dead slow, so don't call it; use JSC::Identifier directly. This is the same issue as was fixed for setProperty() in commit a8574172dd5e6bc11cf6f69b6fad5a063549e88d.
* | implement proxying of JSObject::putWithAttributes() on Global ObjectKent Hansen2009-08-262-0/+13
| | | | | | | | | | | | Otherwise the property is stored on the wrong object (the proxy). This fix makes the Qt bindings generated by qtscriptgenerator work again.
* | Another memoryleak in QScriptEngineOlivier Goffart2009-08-251-5/+5
| | | | | | | | | | | | | | | | QScriptValuePrivate released by garbage collector later in ~QScriptEnginePrivate (when destroying the agents) would be added to the freelist and not be released Reviewed-by: Kent Hansen
* | Memory leak in QScriptEngineAgent.Olivier Goffart2009-08-252-3/+1
| | | | | | | | | | | | | | The documentation of the agent constructor specify that the agant is owned by the engine. Even if the agent is not set to the engine Reviewed-by: Kent Hansen
* | Fix memory leak in QScriptEngine::newQObjectOlivier Goffart2009-08-252-8/+8
| | | | | | | | | | | | | | Do not reset the delegate and the prototype when reusing existing wrapper. Reviewed-by: Kent Hansen
* | fix performance issue with QScriptValue::setProperty()Kent Hansen2009-08-242-75/+83
| | | | | | | | | | Calling QScriptEngine::toStringHandle() is dead slow, so don't call it; use JSC::Identifier() directly instead.
* | pass engine and identifier to QScriptStringPrivate constructorKent Hansen2009-08-242-7/+7
| | | | | | | | Small cleanup/optimization.
* | add an internal QScriptValue ctor to initialize from d-pointerKent Hansen2009-08-243-3/+11
| | | | | | | | | | Avoid having to create a dummy QScriptValue (which will have its d_ptr set to 0).
* | make some internal qtscript functions inlineKent Hansen2009-08-244-133/+132
| | | | | | | | Make it faster.
* | compile fix with namespaced Qthjk2009-08-2410-22/+28
| |
* | pass engine pointer to QScriptValuePrivateKent Hansen2009-08-243-34/+19
| | | | | | | | Just a little cleanup.
* | handle memory management of QScriptValuePrivate in engine if possibleKent Hansen2009-08-244-17/+61
| | | | | | | | | | | | | | | | | | Avoid calling malloc() and free() so often. The premise is that QScriptValue is usually a short-lived type, and only a few QScriptValues exist at a time, so if we cache privates in the engine, QScriptValues will be much faster to create and destroy. Reviewed-by: Olivier Goffart
* | fix memory leakKent Hansen2009-08-241-1/+0
| | | | | | | | | | | | Introduced in commit 38e0c07a78fb585e23c4ff8947be737a28b2257c Reviewed-by: Olivier Goffart
* | avoid calling QScriptValue::isFunction() inside call() and construct()Kent Hansen2009-08-241-16/+26
| | | | | | | | | | | | | | Avoid calling virtual function JSC::JSValue::get{Call,Construct}Data() twice. Reviewed-by: Olivier Goffart
* | use QVarLengthArray instead of QVector for holding JS argumentsKent Hansen2009-08-242-6/+4
| | | | | | | | | | | | It's faster. Reviewed-by: Olivier Goffart
* | Fix QScriptContext::argumentObjects for function called with QScriptValue::callOlivier Goffart2009-08-241-2/+7
| | | | | | | | They have the hostCallFrameFlag, but are function context, not <eval> context
* | QScriptValue: No need to create the activation object for call or constructOlivier Goffart2009-08-241-4/+0
| | | | | | | | It is uneeded and add useless overhead
* | Trivial: Remove uneeded #includeHarald Fernengel2009-08-241-1/+0
| |
* | Fix obsolete license headers.Jason McDonald2009-08-2117-17/+17
| | | | | | | | Reviewed-by: Trust Me
* | Merge commit 'qt/master'Jason Barron2009-08-211-0/+9
|\ \
| * | get rid of qmake warnings when parsing script.pro (JavaScriptCore.pri)Kent Hansen2009-08-211-0/+9
| | |
* | | compile again after mergeHarald Fernengel2009-08-218-88/+14
| | |
* | | Merge commit 'qt/master'Jason Barron2009-08-21138-34071/+12810
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.exe examples/examples.pro qmake/Makefile.unix qmake/Makefile.win32 qmake/Makefile.win32-g++ qmake/Makefile.win32-g++-sh qmake/qmake.pro src/script/api/qscriptable.h src/script/api/qscriptclasspropertyiterator.h src/script/api/qscriptcontext.h src/script/api/qscriptengineagent.cpp src/script/api/qscriptstring.cpp src/script/api/qscriptstring.h src/script/api/qscriptvalueiterator.cpp src/script/api/qscriptvalueiterator.h src/script/qscriptclass.cpp src/script/qscriptcontext.cpp src/script/qscriptengine.cpp src/script/qscriptengine_p.cpp src/script/qscriptvalue.cpp src/script/qscriptvalue_p.h src/script/qscriptvalueimplfwd_p.h src/script/script.pro src/src.pro tests/auto/auto.pro tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp tools/configure/configureapp.cpp
| * | implement registered script values as a doubly linked listKent Hansen2009-08-204-13/+33
| | | | | | | | | | | | It's faster.
| * | use a list to keep track of registered script valuesKent Hansen2009-08-204-116/+41
| | | | | | | | | | | | Get rid of the hash.
| * | store the engine's d-pointer in QScriptValuePrivateKent Hansen2009-08-203-150/+115
| | | | | | | | | | | | | | | It's the d-pointer that we most frequently want to access, so store it to avoid having to use QScriptEnginePrivate::get() all over the place.
| * | remove redundant variableKent Hansen2009-08-202-10/+3
| | |
| * | remove unused variableKent Hansen2009-08-201-1/+0
| | |
| * | add recursion guard for GC markingKent Hansen2009-08-203-4/+10
| | | | | | | | | | | | | | | | | | | | | To achieve behavior of the old back-end. There, the recursion guard was automatic because a mark flag was set on the object as soon as marking begun, but in JSC it appears to only be set _after_ the marking is completed.
| * | provide line number information for innermost call frameKent Hansen2009-08-204-0/+11
| | | | | | | | | | | | | | | For the innermost frame, we don't have a returnPC, so use the line number that was last passed to the engine agent.
| * | set the current frame when getting callbacks in JSC DebuggerKent Hansen2009-08-202-30/+39
| | | | | | | | | | | | | | | If the debugger stops execution, we want the frame pointer to be in sync (so we get the full backtrace).
| * | make QScriptEngine::objectById() workKent Hansen2009-08-201-7/+2
| | | | | | | | | | | | | | | It needs to work even when there is no public QScriptValue that holds a reference to the object.
| * | Fix "fixme" in QtFunction::mark()Jedrzej Nowacki2009-08-201-3/+1
| | | | | | | | | | | | | | | | | | QtFunction::mark() does not cause infinite recursion any more. Reviewed-by: Kent Hansen