summaryrefslogtreecommitdiffstats
path: root/src/script
Commit message (Collapse)AuthorAgeFilesLines
...
| * | 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
| * | | port commit 8fca9052e72d1dc983443c3a8065f804bebf77e7 from qt/masterKent Hansen2009-08-181-1/+1
| | | | | | | | | | | | | | | | QtScript must respect dynamic metaobjects when installed.
| * | | Build on Windows CEKent Hansen2009-08-171-0/+8
| | | |
| * | | adopt variant-to-string conversion of the original qtscript back-endKent Hansen2009-08-171-5/+8
| | | |
| * | | remove unnecessary ifdefsKent Hansen2009-08-172-14/+9
| | | |
| * | | push the right object when the argument is the Global ObjectKent Hansen2009-08-141-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the internal Global Object is never exposed to the public, we need to do like we do in setActivationObject(): if the object passed is the Global Object proxy, use the internal Global Object as the "real" argument. (JSC requires that the initial object pushed onto the scope chain is an instance of JSC::JSGlobalObject, and the Global Object proxy is not; hence, we can't push the proxy.)
| * | | Detect evaluation context in the backtraceOlivier Goffart2009-08-141-0/+3
| | | |
| * | | More polishing on the backtraceOlivier Goffart2009-08-141-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | change the coding style of function from foo (arg=text) to foo(arg = 'text')
| * | | Polish the QScriptContext::backtrace()Olivier Goffart2009-08-141-21/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - in QScriptContextInfo, get the filename of specials context - in QScriptContextInfo, get the right information for the global context (from the skipped fake frame) - addapt the test to the current backtrace layout.
| * | | use originalGlobalObject() instead of lexicalGlobalObject() where possibleKent Hansen2009-08-142-3/+3
| | | | | | | | | | | | | | | | | | | | No need to look up the global object via the scope chain since we have a direct pointer to it already.
| * | | make sure QScriptContext::scopeChain() returns the right objectKent Hansen2009-08-141-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow-up to commit e0a86dc604b87921652b844a5f85889bb6291ed9. Just like in the activationObject() function, we need to check if the activation object is actually a proxy to another object, and return that other object if that's the case (the proxy object should not be exposed to the public).
| * | | make it possible for any script object to serve as activation objectKent Hansen2009-08-143-11/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1414-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | Fix compilation with MSVC.Simon Hausmann2009-08-141-0/+1
| | | | | | | | | | | | | | | | | | | | A forward declaration of QScriptString is not sufficient for MSVC, include qscriptstring.h.
| * | | Fix compilation with MSVCSimon Hausmann2009-08-141-10/+10
| | | | | | | | | | | | | | | | | | | | Use the JSC_HOST_CALL annotation for the declaration as well as for the definition of the JSC callback functions.
| * | | Fix inclusions of "utils/qscriptdate_p.h" with msvcSimon Hausmann2009-08-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Don't rely on the current working directory being src/script, as that does not appear to be the case when building with .vcproj files. Instead add src/script to the INCLUDEPATH, so that the above inclusion works.
| * | | implement GC marking of qobject sender JS wrapperKent Hansen2009-08-141-5/+5
| | | |
| * | | Skip the fake context created by Interpreter::exucute for the backtraceOlivier Goffart2009-08-141-0/+5
| | | |
| * | | get rid of src/script/webkit.priKent Hansen2009-08-132-43/+44
| | | | | | | | | | | | | | | | Not needed since commit 9727a71ea077658148e963bc8510269b08095023.
| * | | Lazily construct the QScriptActivationObjectOlivier Goffart2009-08-135-39/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | Make simple function getters inlineOlivier Goffart2009-08-124-22/+3
| | | |
| * | | Set 'this' on the javascript stack for native functionOlivier Goffart2009-08-121-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When called from the interpreter, we do not need to create a stack frame, but we need anyway to put the newly created this on the stack. This fixes crash in the test qscriptjstestsuite
| * | | 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
| * | | Make it possible to build QtScript against JavaScriptCore from an external ↵Simon Hausmann2009-08-121-19/+30
| | | | | | | | | | | | | | | | | | | | | | | | directory Reviewed-by: Kent Hansen
| * | | Cantralize the place when we construct the default 'this' object that JSC ↵Olivier Goffart2009-08-123-28/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-126-86/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | Move JSC::Debugger's events calls from JSC::evaluate() toJedrzej Nowacki2009-08-121-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QSCriptEngine::evaluate() Fix broken behavior after bad integration with 538153994cacc4613aef1eb8ef77e501be7f5a88 commit
| * | | Crash fix.Jedrzej Nowacki2009-08-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Fix GetSetAgent() in tst_qscriptengine. Reviewed-by: TrustMe
| * | | Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into ↵Kent Hansen2009-08-1244-46/+46
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | revert part of commit 2449e7fc567f8151736949032a001cf2aa2d5bb9Kent Hansen2009-08-121-2/+1
| | | | | | | | | | | | | | | | | | | | It reverted commit f2f338a922d20ad36c9849f5ea3208a8c4f1674a.