X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/f9bf01c6616d5ddcf65b13b33cedf9e387ff7a63..4be4e30906bcb8ee30b4d189205cb70bad6707ce:/runtime/JSVariableObject.cpp diff --git a/runtime/JSVariableObject.cpp b/runtime/JSVariableObject.cpp index 7365001..fc262f5 100644 --- a/runtime/JSVariableObject.cpp +++ b/runtime/JSVariableObject.cpp @@ -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 @@ -29,43 +29,10 @@ #include "config.h" #include "JSVariableObject.h" -#include "PropertyNameArray.h" -#include "PropertyDescriptor.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::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