| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
The engine owns its agents, and also knows when they are deleted.
|
|
|
|
|
|
| |
Get rid off some compilation warnings about unused variables.
Reviewed-by: Kent Hansen
|
|
|
|
|
|
|
|
|
|
| |
qtscript-jsc-backend
Conflicts:
src/script/qscriptclass.cpp
src/script/qscriptcontext.cpp
src/script/qscriptengine.cpp
src/script/qscriptvalue.cpp
|
|
|
|
|
|
|
| |
Get rid of conversion functions QScript::qtStringFromJSCUString and
QScript::qtStringToJSCUString. Code was moved to cast operators.
Reviewed-by: Kent Hansen
|
| |
|
|
|
|
|
|
|
|
|
| |
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.)
|
| |
|
|
|
|
|
|
| |
change the coding style of function from
foo (arg=text)
to foo(arg = 'text')
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
|
| |
No need to look up the global object via the scope chain since we have
a direct pointer to it already.
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
A forward declaration of QScriptString is not sufficient for MSVC,
include qscriptstring.h.
|
|
|
|
|
| |
Use the JSC_HOST_CALL annotation for the declaration as well as for the
definition of the JSC callback functions.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
doesn't construct.
Removes code duplication.
This also indirrectly fixes the QMetaObjectWrapperObject where this was missing
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
QSCriptEngine::evaluate()
Fix broken behavior after bad integration with
538153994cacc4613aef1eb8ef77e501be7f5a88 commit
|
|
|
|
|
|
| |
Fix GetSetAgent() in tst_qscriptengine.
Reviewed-by: TrustMe
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
On 64-bit machines the construction of QVariant from intptr_t is
ambigious as it could be void* or ulonglong. The documentation for
the debugger extension on the other hand is clear that it should be a
qint64. An explicit construction of a qint64 fixes it.
Reviewed-by: Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Complete reimplementation of QScriptEngineAgentPrivate.
New QScriptEngineAgentPrivate implementation makes conversion from
different JSC::Debuger types and events to corresponding
QScriptEngineAgent.
contextPush and contextPop events are created in QScriptEngine each time
contextPush or contextPop is ordered from public API
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A lot of the JSC::ExecState functions rely on scopeChain() not
being 0. This means we shouldn't pop the scope chain if doing so
would make it empty; otherwise when you call e.g. pushScope() or
evaluate(), you will crash. So instead of popping the chain
completely, we now set the sole scope chain item's object pointer to
0 and add appropriate checks elsewhere.
A second issue, not solved in this commit, is that JSC expects
the Global Object to always be the last item in every scope
chain. If it's not, you will crash.
|
|
|
|
|
|
|
|
|
|
|
|
| |
For arguments, we always need to skip the implicit 'this' argument
For line number, we walk thought the stack frames from the top to find
the one above the requested one, which contains the returnPC we need.
Also fixed a crash because QScriptContext::parentContext would have
returned a pointer with flags inside.
Reviewed-by: Kent Hansen
|
|
|
|
|
| |
Also fix some autotest failures, improve the descriptions of failures,
and make the tests run to completion.
|
| |
|
| |
|
|
|
|
|
| |
Introduce a frameForContext() function so we don't have to cast
all over the place.
|
|
|
|
|
| |
Added the properties to the activation object: __extension__,
__setupPackage__ and __postInit__.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It doesn't work for overloaded methods yet (unless you just
happened to call the overload that's defined last in the source
file).
In the old back-end we stored the actual overload that was being
called in the QScriptContextPrivate. Since QScriptContext is a
JSC::ExecState now, we either have to add the information to
JSC::ExecState, or add some mapping scheme so we can go
determine the meta-index for a particular (ExecState, QtFunction)
pair.
Also in this commit: Marked expected failures, so the autotests
will run to completion.
|
|
|
|
|
| |
Doesn't pass the test yet, but at least it returns something that
might be useful on occasion.
|
| |
|
|
|
|
|
| |
JSObject::getPropertyAttributes() does not follow the prototype
chain, so we have to do it.
|
|
|
|
|
| |
Look in the __qt_scope__ property that is set by
QScriptValue::setScope().
|
|
|
|
|
|
|
|
|
| |
qtscript-jsc-backend
Conflicts:
src/script/api/qscriptable.cpp
src/script/api/qscriptable_p.h
src/script/qscriptclassdata.cpp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-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
|
| |
|
|
|
|
|
|
| |
Those functions are internal and we don't want to support them
in the JSC back-end, because they expose too much implementation
detail of the old back-end.
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
We can infer it from the JSC environment when the function is
actually called.
|
| |
|
|
|
|
|
| |
Otherwise evaluate() would _always_ return the value previously
passed to abortEvaluation(), once a script had been aborted.
|
| |
|
| |
|