summaryrefslogtreecommitdiffstats
path: root/src/script
Commit message (Collapse)AuthorAgeFilesLines
* 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
| * Do not pass JSValue per const referenceOlivier Goffart2009-08-192-4/+4
| | | | | | | | It is a POD with the size of a pointer
| * CleanupsOlivier Goffart2009-08-193-24/+5
| | | | | | | | | | Remove useless variable. Use QBoolBlocker instread of custom QScript::InEval.
| * invalidate wrapped JSC::JSValue when script engine is deletedKent Hansen2009-08-191-2/+5
| | | | | | | | Otherwise we will crash if someone tries to do something with the value.
| * Fix QScriptValue::objectId().Jedrzej Nowacki2009-08-194-8/+12
| | | | | | | | | | | | | | QScriptValue id were made persistent. It depands on JSC:JSValue JSCell pointer not on QScriptValuePrivate attr. Reviewed-by: Kent Hansen
| * make QScriptEngine::isEvaluating() work for top-level evaluationKent Hansen2009-08-192-2/+21
| | | | | | | | | | | | Since QScriptEngine::evaluate() doesn't create a new stack frame anymore, we need to use a dedicated variable to keep track of whether the engine is currently evaluating or not.
| * Q_DISABLE_COPY were added to QScriptValuePrivate.Jedrzej Nowacki2009-08-191-0/+1
| | | | | | | | Reviewed-by: Kent Hansen
| * Clean upJedrzej Nowacki2009-08-191-1/+0
| | | | | | | | | | | | There is no point in setting class member in destructor Reviewed-by: Kent Hansen
| * Internal API clean up.Jedrzej Nowacki2009-08-193-16/+0
| | | | | | | | | | | | Static method QScriptValue::initFromJSCValue was removed. Reviewed-by: Kent Hansen
| * Clean up.Jedrzej Nowacki2009-08-193-49/+57
| | | | | | | | | | | | | | | | | | Internal API of QScriptValue were cleaned. toPublic() was removed and replaced by standard static Private::get(). All initFromXXX() methods were replaced by overload call of initFrom(). Reviewed-by: Kent Hansen
| * Fix potential building problem.Jedrzej Nowacki2009-08-191-7/+2
| | | | | | | | | | | | | | | | Comparison between pointer and int where removed. According to doc operator-> where created (class QScriptValueAutoRegister suppose to behave as pointer). Reviewed-by: Kent Hansen
| * Fix the QScriptContext::argumentsObject and QScriptContext::argument for js ↵Olivier Goffart2009-08-181-7/+14
| | | | | | | | | | | | | | | | | | | | | | | | functions On js functions, if the number of arguments is different from the number of expected arguments, they are located in different place in the stackframe. We need to call the JSC functions that take that into account. Test is the backtrace test Reviewed-by: Kent Hansen
| * Fix the line numbers on the backtraceOlivier Goffart2009-08-181-1/+1
| | | | | | | | | | | | | | The returnPC points to the opcode after the call, but we want the opcode right before to compute the line number. Reviewed-by: Kent Hansen
| * implement getter/setter proxying for Global Object and activation objectKent Hansen2009-08-184-0/+77
| |
| * adopt same ownership relationship of scriptengine agents as in old back-endKent Hansen2009-08-183-8/+33
| | | | | | | | The engine owns its agents, and also knows when they are deleted.
| * Clean up.Jedrzej Nowacki2009-08-181-1/+1
| | | | | | | | | | | | Unused variable were commented. Reviewed-by: Kent Hansen
| * Clean up.Jedrzej Nowacki2009-08-182-6/+29
| | | | | | | | | | | | Get rid off some compilation warnings about unused variables. Reviewed-by: Kent Hansen
| * Clean upJedrzej Nowacki2009-08-183-1437/+0
| | | | | | | | | | | | Remove old unused visitors code. Reviewed-by: Kent Hansen
| * Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into ↵Kent Hansen2009-08-185-5/+5
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | qtscript-jsc-backend Conflicts: src/script/qscriptclass.cpp src/script/qscriptcontext.cpp src/script/qscriptengine.cpp src/script/qscriptvalue.cpp
| * | Clean up.Jedrzej Nowacki2009-08-1811-104/+81
| | | | | | | | | | | | | | | | | | | | | Get rid of conversion functions QScript::qtStringFromJSCUString and QScript::qtStringToJSCUString. Code was moved to cast operators. Reviewed-by: Kent Hansen