27 #include "../api/qscriptengine.h" 28 #include "../api/qscriptengine_p.h" 44 GlobalObject::GlobalObject()
45 :
JSC::JSGlobalObject(), customGlobalObject(0)
55 JSC::JSGlobalObject::markChildren(markStack);
61 const JSC::Identifier& propertyName,
62 JSC::PropertySlot& slot)
65 if (propertyName == exec->propertyNames().arguments && engine->
currentFrame->argumentCount() > 0) {
72 return JSC::JSGlobalObject::getOwnPropertySlot(exec, propertyName, slot);
76 const JSC::Identifier& propertyName,
77 JSC::PropertyDescriptor& descriptor)
81 if (propertyName == exec->propertyNames().arguments && engine->
currentFrame->argumentCount() > 0) {
84 descriptor.setValue(args);
89 return JSC::JSGlobalObject::getOwnPropertyDescriptor(exec, propertyName, descriptor);
93 JSC::JSValue value, JSC::PutPropertySlot& slot)
98 JSC::JSGlobalObject::put(exec, propertyName, value, slot);
102 JSC::JSValue value,
unsigned attributes)
107 JSC::JSGlobalObject::putWithAttributes(exec, propertyName, value, attributes);
114 return JSC::JSGlobalObject::deleteProperty(exec, propertyName);
118 JSC::EnumerationMode mode)
123 JSC::JSGlobalObject::getOwnPropertyNames(exec, propertyNames, mode);
126 void GlobalObject::defineGetter(JSC::ExecState* exec,
const JSC::Identifier& propertyName, JSC::JSObject* getterFunction,
unsigned attributes)
131 JSC::JSGlobalObject::defineGetter(exec, propertyName, getterFunction, attributes);
134 void GlobalObject::defineSetter(JSC::ExecState* exec,
const JSC::Identifier& propertyName, JSC::JSObject* setterFunction,
unsigned attributes)
139 JSC::JSGlobalObject::defineSetter(exec, propertyName, setterFunction, attributes);
146 return JSC::JSGlobalObject::lookupGetter(exec, propertyName);
153 return JSC::JSGlobalObject::lookupSetter(exec, propertyName);
QScriptEnginePrivate * scriptEngineFromExec(const JSC::ExecState *exec)
#define QT_END_NAMESPACE
This macro expands to.
virtual bool getOwnPropertySlot(JSC::ExecState *, const JSC::Identifier &propertyName, JSC::PropertySlot &)
virtual void putWithAttributes(JSC::ExecState *exec, const JSC::Identifier &propertyName, JSC::JSValue value, unsigned attributes)
ASSERT_CLASS_FITS_IN_CELL(::QScript::QScriptActivationObject)
virtual void defineSetter(JSC::ExecState *, const JSC::Identifier &propertyName, JSC::JSObject *setterFunction, unsigned attributes=0)
virtual void defineGetter(JSC::ExecState *, const JSC::Identifier &propertyName, JSC::JSObject *getterFunction, unsigned attributes=0)
QScriptValue argumentsObject() const
Returns the arguments object of this QScriptContext.
JSC::ExecState * currentFrame
virtual bool getOwnPropertyDescriptor(JSC::ExecState *, const JSC::Identifier &propertyName, JSC::PropertyDescriptor &)
virtual void put(JSC::ExecState *exec, const JSC::Identifier &propertyName, JSC::JSValue, JSC::PutPropertySlot &)
#define QT_BEGIN_NAMESPACE
This macro expands to.
JSC::JSValue scriptValueToJSCValue(const QScriptValue &value)
static QScriptContext * contextForFrame(JSC::ExecState *frame)
virtual JSC::JSValue lookupGetter(JSC::ExecState *, const JSC::Identifier &propertyName)
virtual JSC::JSValue lookupSetter(JSC::ExecState *, const JSC::Identifier &propertyName)
JSC::JSObject * customGlobalObject
#define QT_USE_NAMESPACE
This macro expands to using QT_NAMESPACE if QT_NAMESPACE is defined and nothing otherwise.
virtual void markChildren(JSC::MarkStack &)
virtual void getOwnPropertyNames(JSC::ExecState *, JSC::PropertyNameArray &, JSC::EnumerationMode mode=JSC::ExcludeDontEnumProperties)
virtual bool deleteProperty(JSC::ExecState *, const JSC::Identifier &propertyName)