Initial work on [[HasProperty]]
authorRoberto Raggi <roberto.raggi@nokia.com>
Mon, 4 Jun 2012 11:44:37 +0000 (13:44 +0200)
committerRoberto Raggi <roberto.raggi@nokia.com>
Mon, 4 Jun 2012 11:44:37 +0000 (13:44 +0200)
qmljs_objects.cpp
qv4isel_x86_64.cpp

index 52c825f..464b9cc 100644 (file)
@@ -83,12 +83,12 @@ bool Object::canSetProperty(Context *ctx, String *name)
     return true;
 }
 
-bool Object::hasProperty(Context *, String *name) const
+bool Object::hasProperty(Context *ctx, String *name) const
 {
     if (members)
         return members->find(name) != 0;
 
-    return false;
+    return prototype ? prototype->hasProperty(ctx, name) : false;
 }
 
 bool Object::deleteProperty(Context *, String *name, bool flag)
index cdf50f8..e60dd56 100644 (file)
@@ -697,11 +697,7 @@ void InstructionSelection::visitMove(IR::Move *s)
                     case IR::OpStrictEqual: op = __qmljs_se; break;
                     case IR::OpStrictNotEqual: op = __qmljs_sne; break;
                     case IR::OpInstanceof: op = __qmljs_instanceof; break;
-
-                    case IR::OpIn:
-                        Q_UNIMPLEMENTED();
-                        assert(!"TODO");
-                        break;
+                    case IR::OpIn: op = __qmljs_in; break;
 
                     case IR::OpAnd:
                     case IR::OpOr: