]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - runtime/JSVariableObject.cpp
JavaScriptCore-1218.35.tar.gz
[apple/javascriptcore.git] / runtime / JSVariableObject.cpp
index a36cefacb0b424effc1c125e11788e44f22131ef..fc262f5d8ef43c4ecda8b9a64fe57d02df7ae0e5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 2008, 2012 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 #include "config.h"
 #include "JSVariableObject.h"
 
-#include "PropertyNameArray.h"
+#include "Operations.h"
 
 namespace JSC {
 
-bool JSVariableObject::deleteProperty(ExecState* exec, const Identifier& propertyName)
-{
-    if (symbolTable().contains(propertyName.ustring().rep()))
-        return false;
-
-    return JSObject::deleteProperty(exec, propertyName);
-}
-
-void JSVariableObject::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames)
-{
-    SymbolTable::const_iterator end = symbolTable().end();
-    for (SymbolTable::const_iterator it = symbolTable().begin(); it != end; ++it) {
-        if (!(it->second.getAttributes() & DontEnum))
-            propertyNames.add(Identifier(exec, it->first.get()));
-    }
-    
-    JSObject::getPropertyNames(exec, propertyNames);
-}
-
-bool JSVariableObject::getPropertyAttributes(ExecState* exec, const Identifier& propertyName, unsigned& attributes) const
-{
-    SymbolTableEntry entry = symbolTable().get(propertyName.ustring().rep());
-    if (!entry.isNull()) {
-        attributes = entry.getAttributes() | DontDelete;
-        return true;
-    }
-    return JSObject::getPropertyAttributes(exec, propertyName, attributes);
-}
-
-bool JSVariableObject::isVariableObject() const
-{
-    return true;
-}
+const ClassInfo JSVariableObject::s_info = { "VariableObject", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(JSVariableObject) };
 
 } // namespace JSC