summaryrefslogtreecommitdiffstats
path: root/src/script/bridge
Commit message (Collapse)AuthorAgeFilesLines
* compile fix with namespaced qthjk2009-09-283-5/+5
| | | | Reviewed-by: Simon Hausmann
* Update src/3rdparty/javascriptcore and adapt src/script to the changes.Kent Hansen2009-09-2412-135/+131
| | | | Reviewed-by: Simon Hausmann
* don't crash in property access after script class has been set to 0Kent Hansen2009-09-221-0/+1
| | | | | | | | 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
* make sure the engine's currentFrame is in sync when calling out to public APIKent Hansen2009-09-221-1/+7
| | | | | | | The currentFrame pointer is used e.g. by QScriptValue::toString(). It needs to be in sync, otherwise we will crash. Reviewed-by: Olivier Goffart
* QtScript: Fix comparing QVariant and QObject.Olivier Goffart2009-09-216-0/+42
| | | | | | | This add a hook inside JSC to be able to implement our own comparison function when comparing objects. Reviewed-by: Kent Hansen
* use JSObject::inherits() instead of JSObject::isObject()Kent Hansen2009-09-212-5/+5
| | | | | | The functions are identical, but in recent WebKit trunk isObject() doesn't exist anymore. So this renaming is done to prepare for the import of a more recent JavaScriptCore.
* Update license headers again.Jason McDonald2009-09-0914-56/+56
| | | | Reviewed-by: Trust Me
* Prospective SunCC compile fixSimon Hausmann2009-09-041-1/+1
| | | | | | Call the QScriptValue constructor without class scope. Reviewed-by: Trust me
* improve memory management scheme of QScriptString(Private)Kent Hansen2009-09-021-4/+12
| | | | | | | | Get rid of QPointer. Use linked list of privates (like was recently done for QScriptValue). Allocate the private on the stack when we can. Reviewed-by: Olivier Goffart
* fix warnings on mingwThierry Bastian2009-09-021-0/+1
|
* Optimize QScriptClassOlivier Goffart2009-09-021-8/+4
| | | | | | | Do not convert JSC::Identifier to QString to convert it later to JSC::Identivier again Reviewed-by: Kent Hansen
* doc: Fixed several qdoc errors.Martin Smith2009-08-311-2/+2
|
* Update tech preview license header for files that are new in 4.6.Jason McDonald2009-08-3112-156/+156
| | | | Reviewed-by: Trust Me
* Merge branch '4.5' into 4.6Thiago Macieira2009-08-312-26/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* 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.
* 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.
* 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.
* Fix memory leak in QScriptEngine::newQObjectOlivier Goffart2009-08-251-0/+2
| | | | | | | Do not reset the delegate and the prototype when reusing existing wrapper. Reviewed-by: Kent Hansen
* compile fix with namespaced Qthjk2009-08-245-10/+16
|
* use QVarLengthArray instead of QVector for holding JS argumentsKent Hansen2009-08-241-2/+1
| | | | | | It's faster. Reviewed-by: Olivier Goffart
* Fix obsolete license headers.Jason McDonald2009-08-2110-10/+10
| | | | Reviewed-by: Trust Me
* 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.
* Fix "fixme" in QtFunction::mark()Jedrzej Nowacki2009-08-201-3/+1
| | | | | | QtFunction::mark() does not cause infinite recursion any more. Reviewed-by: Kent Hansen
* CleanupsOlivier Goffart2009-08-192-7/+4
| | | | | Remove useless variable. Use QBoolBlocker instread of custom QScript::InEval.
* implement getter/setter proxying for Global Object and activation objectKent Hansen2009-08-184-0/+77
|
* Clean up.Jedrzej Nowacki2009-08-181-1/+1
| | | | | | Unused variable were commented. Reviewed-by: Kent Hansen
* Clean up.Jedrzej Nowacki2009-08-181-0/+1
| | | | | | Get rid off some compilation warnings about unused variables. Reviewed-by: Kent Hansen
* Clean up.Jedrzej Nowacki2009-08-183-35/+35
| | | | | | | Get rid of conversion functions QScript::qtStringFromJSCUString and QScript::qtStringToJSCUString. Code was moved to cast operators. Reviewed-by: Kent Hansen
* port commit 8fca9052e72d1dc983443c3a8065f804bebf77e7 from qt/masterKent Hansen2009-08-181-1/+1
| | | | QtScript must respect dynamic metaobjects when installed.
* adopt variant-to-string conversion of the original qtscript back-endKent Hansen2009-08-171-5/+8
|
* remove unnecessary ifdefsKent Hansen2009-08-171-4/+2
|
* use originalGlobalObject() instead of lexicalGlobalObject() where possibleKent Hansen2009-08-141-1/+1
| | | | | No need to look up the global object via the scope chain since we have a direct pointer to it already.
* make it possible for any script object to serve as activation objectKent Hansen2009-08-142-5/+75
| | | | | | | This was possible in the old back-end. In JSC, activation objects have to be instances of JSC::JSVariableObject. So the way we solve it is by having our QScriptActivationObject be able to act as a proxy to any other JSObject.
* Fix compilation on WindowsSimon Hausmann2009-08-141-0/+3
| | | | | | Don't compile moc_qscriptqobject_p.cpp separately but compile it from qscriptqobject.cpp instead, to ensure that config.h is included. That ensures that min/max are undeffed as macros.
* Fix compilation on WindowsSimon Hausmann2009-08-147-0/+7
| | | | | | In WebKit/JSC config.h needs to be included first in .cpp files, to among other things make sure that min/max are not defined as macros through windows.h.
* implement GC marking of qobject sender JS wrapperKent Hansen2009-08-141-5/+5
|
* Lazily construct the QScriptActivationObjectOlivier Goffart2009-08-131-4/+1
| | | | | | | | | | | We can store flags on the ReturnValueRegister entry in the stackframe header (as native function don't use that) Then when requesting an activation object we can lookup the flags to know if we should create it. This reduce a lot the cost of a native call. Reviewed-by: Kent Hansen
* Push frames when needed for native getter or settersOlivier Goffart2009-08-121-2/+6
| | | | | This is some other places where Qt native function may expect to have their own context
* Cantralize the place when we construct the default 'this' object that JSC ↵Olivier Goffart2009-08-122-27/+3
| | | | | | | | doesn't construct. Removes code duplication. This also indirrectly fixes the QMetaObjectWrapperObject where this was missing
* Refactor the way the JS stack are created for native functionOlivier Goffart2009-08-123-30/+66
| | | | | | | | | | The original JavaScriptCore doesn't create stack frame or scope for native function. JSC has been patched to support that. This commit revert our patches to JSC, and implement create the stack frame from QScript Reviewed-by: Kent Hansen
* Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into ↵Kent Hansen2009-08-124-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qtscript-jsc-backend Conflicts: configure src/script/qscriptarray_p.h src/script/qscriptasm.cpp src/script/qscriptasm_p.h src/script/qscriptbuffer_p.h src/script/qscriptclass.cpp src/script/qscriptclassdata.cpp src/script/qscriptclassdata_p.h src/script/qscriptclassinfo_p.h src/script/qscriptclasspropertyiterator_p.h src/script/qscriptcompiler.cpp src/script/qscriptcompiler_p.h src/script/qscriptcontext_p.cpp src/script/qscriptcontext_p.h src/script/qscriptcontextfwd_p.h src/script/qscriptcontextinfo_p.h src/script/qscriptecmaarray.cpp src/script/qscriptecmaarray_p.h src/script/qscriptecmaboolean.cpp src/script/qscriptecmaboolean_p.h src/script/qscriptecmacore.cpp src/script/qscriptecmacore_p.h 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/qscriptengineagent_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/qscriptextvariant_p.h src/script/qscriptfunction.cpp src/script/qscriptfunction_p.h src/script/qscriptgc_p.h src/script/qscriptglobals_p.h src/script/qscriptmember_p.h src/script/qscriptnameid_p.h src/script/qscriptnodepool_p.h src/script/qscriptobject_p.h src/script/qscriptobjectfwd_p.h src/script/qscriptprettypretty.cpp src/script/qscriptprettypretty_p.h src/script/qscriptsyntaxcheckresult_p.h src/script/qscriptvalue.cpp src/script/qscriptvalue_p.h src/script/qscriptvaluefwd_p.h src/script/qscriptvalueimpl.cpp src/script/qscriptvalueimpl_p.h src/script/qscriptvalueimplfwd_p.h src/script/qscriptvalueiteratorimpl.cpp src/script/qscriptvalueiteratorimpl_p.h
* Call to JSC::Debugger's new events that where created inJedrzej Nowacki2009-08-111-0/+11
| | | | | | | | | | b62ab93d001d2f3238e24faa133720cb877e3023 commit. Workaround for multiple decorators problem. FunctionWrapper and NativeConstrWrapper needs access to original result value (from native function call). Solution was to move part of the NativeConstrWrapper's functionality (functionExit debugger's event) to FunctionWrapper::proxyConstruct.
* implement QScriptClass property query semantics of old back-endKent Hansen2009-08-101-1/+6
| | | | | Look up the property as a normal JS property before falling back to the dynamic query mechanism. This is the documented behavior.
* add configure options for (not) building the QtScript moduleKent Hansen2009-08-0714-56/+0
| | | | | | | | | | | | | | | | | | -script (default) and -no-script. This means we can get rid of the SCRIPT feature from qfeatures, since it's now handled by the new configure variable. It also allows us to get rid of all the QT_NO_SCRIPT ifdefs from the source files, since qmake isn't going to include those files for compilation when you configure with -no-script. The QtScriptTools module will be disabled if the QtScript module is not built. You'll have to build the old QtScript back-end (will be made available in a separate package), then build the QtScriptTools module yourself. Reviewed-by: Simon Hausmann
* fix regression in enumeration of QPropertiesKent Hansen2009-08-061-1/+1
|
* port commit 47c9e7b1b3551ff6dbe71590461a45ae398a9501 from qt/masterKent Hansen2009-08-062-6/+10
|
* finish implementation of QVariant.prototype.toString()Kent Hansen2009-08-061-16/+24
| | | | Behave like the old back-end.
* make iteration work for the global object againKent Hansen2009-08-062-6/+8
| | | | Follow-up to commit 520378cfedd63544a9689687256d2c89352ee561
* Updates getPropertyNames() on all javascript object to use the flagBenjamin Poulain2009-08-056-17/+17
| | | | | | | | getPropertyNames() now uses a flag to specify which property should be filtered. This flag should be used by all javascript objects. This patch fixes the changes introduced by e520df1f8678bd59adb341fb586f008a7de17fe8
* make QScriptEngine::newQMetaObject() workKent Hansen2009-08-052-64/+106
|