Commit 660bfe17 authored by bmeurer@chromium.org's avatar bmeurer@chromium.org

Cleanup property module.

R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/218683008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20391 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 7c38cdb2
// Copyright 2012 the V8 project authors. All rights reserved. // Copyright 2014 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without // Use of this source code is governed by a BSD-style license that can be
// modification, are permitted provided that the following conditions are // found in the LICENSE file.
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * 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.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "v8.h" #include "property.h"
#include "handles-inl.h"
namespace v8 { namespace v8 {
namespace internal { namespace internal {
void LookupResult::Iterate(ObjectVisitor* visitor) { void LookupResult::Iterate(ObjectVisitor* visitor) {
LookupResult* current = this; // Could be NULL. LookupResult* current = this; // Could be NULL.
while (current != NULL) { while (current != NULL) {
...@@ -114,9 +92,6 @@ void Descriptor::Print(FILE* out) { ...@@ -114,9 +92,6 @@ void Descriptor::Print(FILE* out) {
PrintF(out, " @ "); PrintF(out, " @ ");
GetValue()->ShortPrint(out); GetValue()->ShortPrint(out);
} }
#endif #endif
} } // namespace v8::internal } } // namespace v8::internal
// Copyright 2012 the V8 project authors. All rights reserved. // Copyright 2014 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without // Use of this source code is governed by a BSD-style license that can be
// modification, are permitted provided that the following conditions are // found in the LICENSE file.
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * 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.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef V8_PROPERTY_H_ #ifndef V8_PROPERTY_H_
#define V8_PROPERTY_H_ #define V8_PROPERTY_H_
#include "allocation.h" #include "isolate.h"
#include "transitions.h"
namespace v8 { namespace v8 {
namespace internal { namespace internal {
// Abstraction for elements in instance-descriptor arrays. // Abstraction for elements in instance-descriptor arrays.
// //
// Each descriptor has a key, property attributes, property type, // Each descriptor has a key, property attributes, property type,
// property index (in the actual instance-descriptor array) and // property index (in the actual instance-descriptor array) and
// optionally a piece of data. // optionally a piece of data.
//
class Descriptor BASE_EMBEDDED { class Descriptor BASE_EMBEDDED {
public: public:
MUST_USE_RESULT MaybeObject* KeyToUniqueName() { MUST_USE_RESULT MaybeObject* KeyToUniqueName() {
...@@ -96,7 +69,7 @@ class Descriptor BASE_EMBEDDED { ...@@ -96,7 +69,7 @@ class Descriptor BASE_EMBEDDED {
}; };
class FieldDescriptor: public Descriptor { class FieldDescriptor V8_FINAL : public Descriptor {
public: public:
FieldDescriptor(Name* key, FieldDescriptor(Name* key,
int field_index, int field_index,
...@@ -107,7 +80,7 @@ class FieldDescriptor: public Descriptor { ...@@ -107,7 +80,7 @@ class FieldDescriptor: public Descriptor {
}; };
class ConstantDescriptor: public Descriptor { class ConstantDescriptor V8_FINAL : public Descriptor {
public: public:
ConstantDescriptor(Name* key, ConstantDescriptor(Name* key,
Object* value, Object* value,
...@@ -117,7 +90,7 @@ class ConstantDescriptor: public Descriptor { ...@@ -117,7 +90,7 @@ class ConstantDescriptor: public Descriptor {
}; };
class CallbacksDescriptor: public Descriptor { class CallbacksDescriptor V8_FINAL : public Descriptor {
public: public:
CallbacksDescriptor(Name* key, CallbacksDescriptor(Name* key,
Object* foreign, Object* foreign,
...@@ -129,7 +102,7 @@ class CallbacksDescriptor: public Descriptor { ...@@ -129,7 +102,7 @@ class CallbacksDescriptor: public Descriptor {
// Holds a property index value distinguishing if it is a field index or an // Holds a property index value distinguishing if it is a field index or an
// index inside the object header. // index inside the object header.
class PropertyIndex { class PropertyIndex V8_FINAL {
public: public:
static PropertyIndex NewFieldIndex(int index) { static PropertyIndex NewFieldIndex(int index) {
return PropertyIndex(index, false); return PropertyIndex(index, false);
...@@ -177,7 +150,7 @@ class PropertyIndex { ...@@ -177,7 +150,7 @@ class PropertyIndex {
}; };
class LookupResult BASE_EMBEDDED { class LookupResult V8_FINAL BASE_EMBEDDED {
public: public:
explicit LookupResult(Isolate* isolate) explicit LookupResult(Isolate* isolate)
: isolate_(isolate), : isolate_(isolate),
...@@ -488,7 +461,6 @@ class LookupResult BASE_EMBEDDED { ...@@ -488,7 +461,6 @@ class LookupResult BASE_EMBEDDED {
PropertyDetails details_; PropertyDetails details_;
}; };
} } // namespace v8::internal } } // namespace v8::internal
#endif // V8_PROPERTY_H_ #endif // V8_PROPERTY_H_
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment