]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - runtime/JSVariableObject.cpp
JavaScriptCore-7600.1.4.13.1.tar.gz
[apple/javascriptcore.git] / runtime / JSVariableObject.cpp
index 73650016a9f21c0b169a793ae11bae5c171b1286..d19c658d970b1bd337b0285e962d13ca3c916793 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
@@ -10,7 +10,7 @@
  * 2.  Redistributions in binary form must reproduce the above copyright
  *     notice, this list of conditions and the following disclaimer in the
  *     documentation and/or other materials provided with the distribution. 
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * 3.  Neither the name of Apple Inc. ("Apple") nor the names of
  *     its contributors may be used to endorse or promote products derived
  *     from this software without specific prior written permission. 
  *
 #include "config.h"
 #include "JSVariableObject.h"
 
-#include "PropertyNameArray.h"
-#include "PropertyDescriptor.h"
+#include "JSCInlines.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::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
-{
-    SymbolTable::const_iterator end = symbolTable().end();
-    for (SymbolTable::const_iterator it = symbolTable().begin(); it != end; ++it) {
-        if (!(it->second.getAttributes() & DontEnum) || (mode == IncludeDontEnumProperties))
-            propertyNames.add(Identifier(exec, it->first.get()));
-    }
-    
-    JSObject::getOwnPropertyNames(exec, propertyNames, mode);
-}
-
-bool JSVariableObject::isVariableObject() const
-{
-    return true;
-}
-
-bool JSVariableObject::symbolTableGet(const Identifier& propertyName, PropertyDescriptor& descriptor)
-{
-    SymbolTableEntry entry = symbolTable().inlineGet(propertyName.ustring().rep());
-    if (!entry.isNull()) {
-        descriptor.setDescriptor(registerAt(entry.getIndex()).jsValue(), entry.getAttributes() | DontDelete);
-        return true;
-    }
-    return false;
-}
+const ClassInfo JSVariableObject::s_info = { "VariableObject", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(JSVariableObject) };
 
 } // namespace JSC