6#include <private/qv4alloca_p.h>
7#include <private/qv4arrayobject_p.h>
8#include <private/qv4function_p.h>
9#include <private/qv4jscall_p.h>
10#include <private/qv4scopedvalue_p.h>
11#include <private/qv4stackframe_p.h>
12#include <private/qv4string_p.h>
13#include <private/qv4symbol_p.h>
23 Q_ASSERT(vtable() == QV4::StrictArgumentsObject::staticVTable());
36 Scoped<QV4::StrictArgumentsObject>
args(scope,
this);
51 this->context.set(v4,
context->d());
52 Q_ASSERT(vtable() == QV4::ArgumentsObject::staticVTable());
62 argCount =
frame->argc();
63 uint nFormals =
frame->v4Function->nFormals;
64 mapped = nFormals > 63 ? std::numeric_limits<quint64>::max() : (1ull << nFormals) - 1;
79 d()->fullyCreated =
true;
86 if (!
id.isArrayIndex())
97 cDesc->copy(desc,
attrs);
99 if (
attrs.isData() && desc->value.isEmpty() &&
attrs.hasWritable() && !
attrs.isWritable()) {
100 cDesc->value =
args->context()->args()[
index];
108 if (
attrs.isAccessor()) {
111 if (!desc->value.isEmpty())
112 args->context()->setArg(
index, desc->value);
113 if (
attrs.hasWritable() && !
attrs.isWritable())
121 if (
id.isArrayIndex()) {
124 if (index < args->
d()->argCount && !
args->d()->fullyCreated) {
127 return args->context()->args()[
index].asReturnedValue();
134 return args->context()->args()[
index].asReturnedValue();
143 if (
id.isArrayIndex()) {
147 if (
args == receiver && index < args->
d()->argCount && !
args->d()->fullyCreated) {
165 if (
result &&
id.isArrayIndex())
166 args->removeMapping(
id.asArrayIndex());
172 if (!
id.isArrayIndex())
177 if (index < args->
d()->argCount && !
args->d()->fullyCreated) {
QFuture< QtPrivate::MapResultType< Sequence, MapFunctor > > mapped(QThreadPool *pool, Sequence &&sequence, MapFunctor &&map)
static struct AttrInfo attrs[]
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLboolean GLboolean GLboolean GLboolean a
[7]
#define DEFINE_OBJECT_VTABLE(classname)
args<< 1<< 2;QJSValue threeAgain=fun.call(args);QString fileName="helloworld.qs";QFile scriptFile(fileName);if(!scriptFile.open(QIODevice::ReadOnly)) QTextStream stream(&scriptFile);QString contents=stream.readAll();scriptFile.close();myEngine.evaluate(contents, fileName);myEngine.globalObject().setProperty("myNumber", 123);...QJSValue myNumberPlusOne=myEngine.evaluate("myNumber + 1");QJSValue result=myEngine.evaluate(...);if(result.isError()) qDebug()<< "Uncaught exception at line"<< result.property("lineNumber").toInt()<< ":"<< result.toString();QPushButton *button=new QPushButton;QJSValue scriptButton=myEngine.newQObject(button);myEngine.globalObject().setProperty("button", scriptButton);myEngine.evaluate("button.checkable = true");qDebug()<< scriptButton.property("checkable").toBool();scriptButton.property("show").call();QJSEngine engine;QObject *myQObject=new QObject();myQObject- setProperty)("dynamicProperty", 3)
Heap::CallContext * context() const
bool fullyCreated() const
bool isMapped(uint arg) const
Symbol * symbol_iterator() const
String * id_callee() const
String * id_length() const
Object * arrayProtoValues() const
FunctionObject * thrower() const
ExecutionEngine * engine() const
const Value * propertyData(uint index) const
bool hasProperty(PropertyKey id) const
bool arrayPut(uint index, const Value &value)
void arrayReserve(uint n)
QV4_NEARLY_ALWAYS_INLINE constexpr quint32 value() const
PropertyKey propertyKey() const
static constexpr VTable::DefineOwnProperty virtualDefineOwnProperty
static constexpr VTable::OwnPropertyKeys virtualOwnPropertyKeys
static constexpr VTable::GetOwnProperty virtualGetOwnProperty
static constexpr VTable::DeleteProperty virtualDeleteProperty
static constexpr VTable::Get virtualGet
static constexpr VTable::GetLength virtualGetLength
static constexpr VTable::Put virtualPut
static constexpr Value fromInt32(int i)