summaryrefslogtreecommitdiffstats
path: root/src/v4/qv4functionobject.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/v4/qv4functionobject.h')
-rw-r--r--src/v4/qv4functionobject.h64
1 files changed, 1 insertions, 63 deletions
diff --git a/src/v4/qv4functionobject.h b/src/v4/qv4functionobject.h
index 4ef9db19..4dddc048 100644
--- a/src/v4/qv4functionobject.h
+++ b/src/v4/qv4functionobject.h
@@ -101,69 +101,7 @@ struct SyntaxErrorPrototype;
struct TypeErrorPrototype;
struct URIErrorPrototype;
struct InternalClass;
-
-struct Lookup {
- enum { Size = 4 };
- InternalClass *classList[Size];
- int level;
- uint index;
- String *name;
-
- Property *lookup(Object *obj, PropertyAttributes *attrs) {
- int i = 0;
- while (i < level && obj && obj->internalClass == classList[i]) {
- obj = obj->prototype;
- ++i;
- }
-
- if (index != UINT_MAX && obj->internalClass == classList[i]) {
- *attrs = obj->internalClass->propertyData.at(index);
- return obj->memberData + index;
- }
-
- while (i < Size && obj) {
- classList[i] = obj->internalClass;
-
- index = obj->internalClass->find(name);
- if (index != UINT_MAX) {
- level = i;
- *attrs = obj->internalClass->propertyData.at(index);
- return obj->memberData + index;
- }
-
- obj = obj->prototype;
- ++i;
- }
- level = i;
-
- while (obj) {
- index = obj->internalClass->find(name);
- if (index != UINT_MAX) {
- *attrs = obj->internalClass->propertyData.at(index);
- return obj->memberData + index;
- }
-
- obj = obj->prototype;
- }
- return 0;
- }
-
- Property *setterLookup(Object *o, PropertyAttributes *attrs) {
- if (o->internalClass == classList[0]) {
- *attrs = o->internalClass->propertyData[index];
- return o->memberData + index;
- }
-
- uint idx = o->internalClass->find(name);
- if (idx != UINT_MAX) {
- classList[0] = o->internalClass;
- index = idx;
- *attrs = o->internalClass->propertyData[index];
- return o->memberData + index;
- }
- return 0;
- }
-};
+struct Lookup;
struct Function {
String *name;