Don't include field-type.h/field-index.h into property.h
BUG= Review URL: https://codereview.chromium.org/1696333002 Cr-Commit-Position: refs/heads/master@{#34035}
This commit is contained in:
parent
099271a189
commit
036d23ec73
@ -8,6 +8,7 @@
|
||||
#include "src/compilation-dependencies.h"
|
||||
#include "src/compiler/access-info.h"
|
||||
#include "src/field-index-inl.h"
|
||||
#include "src/field-type.h"
|
||||
#include "src/objects-inl.h" // TODO(mstarzinger): Temporary cycle breaker!
|
||||
#include "src/type-cache.h"
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
#include "src/crankshaft/hydrogen-types.h"
|
||||
|
||||
#include "src/field-type.h"
|
||||
#include "src/handles-inl.h"
|
||||
#include "src/ostreams.h"
|
||||
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include "src/crankshaft/hydrogen-uint32-analysis.h"
|
||||
#include "src/crankshaft/lithium-allocator.h"
|
||||
#include "src/crankshaft/typing.h"
|
||||
#include "src/field-type.h"
|
||||
#include "src/full-codegen/full-codegen.h"
|
||||
#include "src/ic/call-optimization.h"
|
||||
#include "src/ic/ic.h"
|
||||
@ -6258,6 +6259,13 @@ HInstruction* HOptimizedGraphBuilder::BuildStoreNamedField(
|
||||
return instr;
|
||||
}
|
||||
|
||||
Handle<FieldType>
|
||||
HOptimizedGraphBuilder::PropertyAccessInfo::GetFieldTypeFromMap(
|
||||
Handle<Map> map) const {
|
||||
DCHECK(IsFound());
|
||||
DCHECK(number_ < map->NumberOfOwnDescriptors());
|
||||
return handle(map->instance_descriptors()->GetFieldType(number_), isolate());
|
||||
}
|
||||
|
||||
bool HOptimizedGraphBuilder::PropertyAccessInfo::IsCompatible(
|
||||
PropertyAccessInfo* info) {
|
||||
|
@ -2622,12 +2622,7 @@ class HOptimizedGraphBuilder : public HGraphBuilder, public AstVisitor {
|
||||
Handle<Object> GetAccessorsFromMap(Handle<Map> map) const {
|
||||
return GetConstantFromMap(map);
|
||||
}
|
||||
Handle<FieldType> GetFieldTypeFromMap(Handle<Map> map) const {
|
||||
DCHECK(IsFound());
|
||||
DCHECK(number_ < map->NumberOfOwnDescriptors());
|
||||
return handle(map->instance_descriptors()->GetFieldType(number_),
|
||||
isolate());
|
||||
}
|
||||
Handle<FieldType> GetFieldTypeFromMap(Handle<Map> map) const;
|
||||
Handle<Map> GetFieldOwnerFromMap(Handle<Map> map) const {
|
||||
DCHECK(IsFound());
|
||||
DCHECK(number_ < map->NumberOfOwnDescriptors());
|
||||
|
@ -35,6 +35,7 @@
|
||||
#endif
|
||||
|
||||
#include "src/d8.h"
|
||||
#include "src/ostreams.h"
|
||||
|
||||
#include "include/libplatform/libplatform.h"
|
||||
#ifndef V8_SHARED
|
||||
|
@ -4,8 +4,10 @@
|
||||
|
||||
#if V8_TARGET_ARCH_ARM
|
||||
|
||||
#include "src/ic/call-optimization.h"
|
||||
#include "src/ic/handler-compiler.h"
|
||||
|
||||
#include "src/field-type.h"
|
||||
#include "src/ic/call-optimization.h"
|
||||
#include "src/ic/ic.h"
|
||||
#include "src/isolate-inl.h"
|
||||
|
||||
|
@ -4,8 +4,10 @@
|
||||
|
||||
#if V8_TARGET_ARCH_ARM64
|
||||
|
||||
#include "src/ic/call-optimization.h"
|
||||
#include "src/ic/handler-compiler.h"
|
||||
|
||||
#include "src/field-type.h"
|
||||
#include "src/ic/call-optimization.h"
|
||||
#include "src/ic/ic.h"
|
||||
#include "src/isolate-inl.h"
|
||||
|
||||
|
@ -4,9 +4,10 @@
|
||||
|
||||
#include "src/ic/handler-compiler.h"
|
||||
|
||||
#include "src/field-type.h"
|
||||
#include "src/ic/call-optimization.h"
|
||||
#include "src/ic/ic.h"
|
||||
#include "src/ic/ic-inl.h"
|
||||
#include "src/ic/ic.h"
|
||||
#include "src/isolate-inl.h"
|
||||
#include "src/profiler/cpu-profiler.h"
|
||||
|
||||
|
@ -4,8 +4,10 @@
|
||||
|
||||
#if V8_TARGET_ARCH_IA32
|
||||
|
||||
#include "src/ic/call-optimization.h"
|
||||
#include "src/ic/handler-compiler.h"
|
||||
|
||||
#include "src/field-type.h"
|
||||
#include "src/ic/call-optimization.h"
|
||||
#include "src/ic/ic.h"
|
||||
#include "src/isolate-inl.h"
|
||||
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "src/codegen.h"
|
||||
#include "src/conversions.h"
|
||||
#include "src/execution.h"
|
||||
#include "src/field-type.h"
|
||||
#include "src/frames-inl.h"
|
||||
#include "src/ic/call-optimization.h"
|
||||
#include "src/ic/handler-compiler.h"
|
||||
|
@ -4,8 +4,10 @@
|
||||
|
||||
#if V8_TARGET_ARCH_MIPS
|
||||
|
||||
#include "src/ic/call-optimization.h"
|
||||
#include "src/ic/handler-compiler.h"
|
||||
|
||||
#include "src/field-type.h"
|
||||
#include "src/ic/call-optimization.h"
|
||||
#include "src/ic/ic.h"
|
||||
#include "src/isolate-inl.h"
|
||||
|
||||
|
@ -4,8 +4,10 @@
|
||||
|
||||
#if V8_TARGET_ARCH_MIPS64
|
||||
|
||||
#include "src/ic/call-optimization.h"
|
||||
#include "src/ic/handler-compiler.h"
|
||||
|
||||
#include "src/field-type.h"
|
||||
#include "src/ic/call-optimization.h"
|
||||
#include "src/ic/ic.h"
|
||||
#include "src/isolate-inl.h"
|
||||
|
||||
|
@ -4,8 +4,10 @@
|
||||
|
||||
#if V8_TARGET_ARCH_PPC
|
||||
|
||||
#include "src/ic/call-optimization.h"
|
||||
#include "src/ic/handler-compiler.h"
|
||||
|
||||
#include "src/field-type.h"
|
||||
#include "src/ic/call-optimization.h"
|
||||
#include "src/ic/ic.h"
|
||||
#include "src/isolate-inl.h"
|
||||
|
||||
|
@ -4,8 +4,10 @@
|
||||
|
||||
#if V8_TARGET_ARCH_X64
|
||||
|
||||
#include "src/ic/call-optimization.h"
|
||||
#include "src/ic/handler-compiler.h"
|
||||
|
||||
#include "src/field-type.h"
|
||||
#include "src/ic/call-optimization.h"
|
||||
#include "src/ic/ic.h"
|
||||
#include "src/isolate-inl.h"
|
||||
|
||||
|
@ -4,8 +4,10 @@
|
||||
|
||||
#if V8_TARGET_ARCH_X87
|
||||
|
||||
#include "src/ic/call-optimization.h"
|
||||
#include "src/ic/handler-compiler.h"
|
||||
|
||||
#include "src/field-type.h"
|
||||
#include "src/ic/call-optimization.h"
|
||||
#include "src/ic/ic.h"
|
||||
#include "src/isolate-inl.h"
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "src/conversions.h"
|
||||
#include "src/debug/debug.h"
|
||||
#include "src/factory.h"
|
||||
#include "src/field-type.h"
|
||||
#include "src/messages.h"
|
||||
#include "src/parsing/scanner.h"
|
||||
#include "src/parsing/token.h"
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "src/bootstrapper.h"
|
||||
#include "src/deoptimizer.h"
|
||||
#include "src/elements.h"
|
||||
#include "src/field-type.h"
|
||||
#include "src/isolate-inl.h"
|
||||
|
||||
namespace v8 {
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "src/bootstrapper.h"
|
||||
#include "src/disasm.h"
|
||||
#include "src/disassembler.h"
|
||||
#include "src/field-type.h"
|
||||
#include "src/macro-assembler.h"
|
||||
#include "src/ostreams.h"
|
||||
#include "src/regexp/jsregexp.h"
|
||||
|
@ -2813,17 +2813,6 @@ int DescriptorArray::GetFieldIndex(int descriptor_number) {
|
||||
return GetDetails(descriptor_number).field_index();
|
||||
}
|
||||
|
||||
FieldType* DescriptorArray::GetFieldType(int descriptor_number) {
|
||||
DCHECK(GetDetails(descriptor_number).location() == kField);
|
||||
Object* value = GetValue(descriptor_number);
|
||||
if (value->IsWeakCell()) {
|
||||
if (WeakCell::cast(value)->cleared()) return FieldType::None();
|
||||
value = WeakCell::cast(value)->value();
|
||||
}
|
||||
return FieldType::cast(value);
|
||||
}
|
||||
|
||||
|
||||
Object* DescriptorArray::GetConstant(int descriptor_number) {
|
||||
return GetValue(descriptor_number);
|
||||
}
|
||||
|
@ -25,8 +25,9 @@
|
||||
#include "src/deoptimizer.h"
|
||||
#include "src/elements.h"
|
||||
#include "src/execution.h"
|
||||
#include "src/field-index.h"
|
||||
#include "src/field-index-inl.h"
|
||||
#include "src/field-index.h"
|
||||
#include "src/field-type.h"
|
||||
#include "src/full-codegen/full-codegen.h"
|
||||
#include "src/ic/ic.h"
|
||||
#include "src/identity-map.h"
|
||||
@ -9906,6 +9907,15 @@ Handle<Map> Map::CopyForPreventExtensions(Handle<Map> map,
|
||||
return new_map;
|
||||
}
|
||||
|
||||
FieldType* DescriptorArray::GetFieldType(int descriptor_number) {
|
||||
DCHECK(GetDetails(descriptor_number).location() == kField);
|
||||
Object* value = GetValue(descriptor_number);
|
||||
if (value->IsWeakCell()) {
|
||||
if (WeakCell::cast(value)->cleared()) return FieldType::None();
|
||||
value = WeakCell::cast(value)->value();
|
||||
}
|
||||
return FieldType::cast(value);
|
||||
}
|
||||
|
||||
bool DescriptorArray::CanHoldValue(int descriptor, Object* value) {
|
||||
PropertyDetails details = GetDetails(descriptor);
|
||||
|
@ -2973,7 +2973,7 @@ class DescriptorArray: public FixedArray {
|
||||
inline PropertyDetails GetDetails(int descriptor_number);
|
||||
inline PropertyType GetType(int descriptor_number);
|
||||
inline int GetFieldIndex(int descriptor_number);
|
||||
inline FieldType* GetFieldType(int descriptor_number);
|
||||
FieldType* GetFieldType(int descriptor_number);
|
||||
inline Object* GetConstant(int descriptor_number);
|
||||
inline Object* GetCallbacksObject(int descriptor_number);
|
||||
inline AccessorDescriptor* GetCallbacks(int descriptor_number);
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
#include "src/property.h"
|
||||
|
||||
#include "src/field-type.h"
|
||||
#include "src/handles-inl.h"
|
||||
#include "src/ostreams.h"
|
||||
|
||||
@ -20,6 +21,11 @@ std::ostream& operator<<(std::ostream& os,
|
||||
return os;
|
||||
}
|
||||
|
||||
DataDescriptor::DataDescriptor(Handle<Name> key, int field_index,
|
||||
PropertyAttributes attributes,
|
||||
Representation representation)
|
||||
: Descriptor(key, FieldType::Any(key->GetIsolate()), attributes, DATA,
|
||||
representation, field_index) {}
|
||||
|
||||
struct FastPropertyDetails {
|
||||
explicit FastPropertyDetails(const PropertyDetails& v) : details(v) {}
|
||||
|
@ -8,8 +8,6 @@
|
||||
#include <iosfwd>
|
||||
|
||||
#include "src/factory.h"
|
||||
#include "src/field-index.h"
|
||||
#include "src/field-type.h"
|
||||
#include "src/isolate.h"
|
||||
|
||||
namespace v8 {
|
||||
@ -75,9 +73,7 @@ std::ostream& operator<<(std::ostream& os, const Descriptor& d);
|
||||
class DataDescriptor final : public Descriptor {
|
||||
public:
|
||||
DataDescriptor(Handle<Name> key, int field_index,
|
||||
PropertyAttributes attributes, Representation representation)
|
||||
: Descriptor(key, FieldType::Any(key->GetIsolate()), attributes, DATA,
|
||||
representation, field_index) {}
|
||||
PropertyAttributes attributes, Representation representation);
|
||||
// The field type is either a simple type or a map wrapped in a weak cell.
|
||||
DataDescriptor(Handle<Name> key, int field_index,
|
||||
Handle<Object> wrapped_field_type,
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include "src/factory.h"
|
||||
#include "src/isolate.h"
|
||||
#include "src/objects-inl.h"
|
||||
#include "src/ostreams.h"
|
||||
#include "src/regexp/jsregexp.h"
|
||||
#include "src/utils.h"
|
||||
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "src/interpreter/bytecode-array-iterator.h"
|
||||
#include "src/interpreter/bytecodes.h"
|
||||
#include "src/isolate-inl.h"
|
||||
#include "src/ostreams.h"
|
||||
|
||||
namespace v8 {
|
||||
namespace internal {
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include "src/deoptimizer.h"
|
||||
#include "src/execution.h"
|
||||
#include "src/factory.h"
|
||||
#include "src/field-type.h"
|
||||
#include "src/global-handles.h"
|
||||
#include "src/heap/gc-tracer.h"
|
||||
#include "src/heap/memory-reducer.h"
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include "src/compilation-cache.h"
|
||||
#include "src/execution.h"
|
||||
#include "src/factory.h"
|
||||
#include "src/field-type.h"
|
||||
#include "src/global-handles.h"
|
||||
#include "src/ic/stub-cache.h"
|
||||
#include "src/macro-assembler.h"
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "src/compilation-cache.h"
|
||||
#include "src/execution.h"
|
||||
#include "src/factory.h"
|
||||
#include "src/field-type.h"
|
||||
#include "src/global-handles.h"
|
||||
#include "test/cctest/cctest.h"
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "src/compilation-cache.h"
|
||||
#include "src/execution.h"
|
||||
#include "src/factory.h"
|
||||
#include "src/field-type.h"
|
||||
#include "src/global-handles.h"
|
||||
#include "src/heap/slots-buffer.h"
|
||||
#include "src/ic/ic.h"
|
||||
|
Loading…
Reference in New Issue
Block a user