OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_COMPILER_PROPERTY_ACCESS_INFO_H_ | 5 #ifndef V8_COMPILER_PROPERTY_ACCESS_INFO_H_ |
6 #define V8_COMPILER_PROPERTY_ACCESS_INFO_H_ | 6 #define V8_COMPILER_PROPERTY_ACCESS_INFO_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 | 9 |
10 #include "src/field-index.h" | 10 #include "src/field-index.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 bool IsDataField() const { return kind() == kDataField; } | 53 bool IsDataField() const { return kind() == kDataField; } |
54 | 54 |
55 Kind kind() const { return kind_; } | 55 Kind kind() const { return kind_; } |
56 MaybeHandle<JSObject> holder() const { return holder_; } | 56 MaybeHandle<JSObject> holder() const { return holder_; } |
57 MaybeHandle<Map> transition_map() const { return transition_map_; } | 57 MaybeHandle<Map> transition_map() const { return transition_map_; } |
58 Handle<Object> constant() const { return constant_; } | 58 Handle<Object> constant() const { return constant_; } |
59 FieldIndex field_index() const { return field_index_; } | 59 FieldIndex field_index() const { return field_index_; } |
60 Type* field_type() const { return field_type_; } | 60 Type* field_type() const { return field_type_; } |
61 Type* receiver_type() const { return receiver_type_; } | 61 Type* receiver_type() const { return receiver_type_; } |
62 | 62 |
| 63 bool HasTransitionMap() const { return !transition_map().is_null(); } |
| 64 |
63 private: | 65 private: |
64 PropertyAccessInfo(MaybeHandle<JSObject> holder, Handle<Object> constant, | 66 PropertyAccessInfo(MaybeHandle<JSObject> holder, Handle<Object> constant, |
65 Type* receiver_type); | 67 Type* receiver_type); |
66 PropertyAccessInfo(MaybeHandle<JSObject> holder, | 68 PropertyAccessInfo(MaybeHandle<JSObject> holder, |
67 MaybeHandle<Map> transition_map, FieldIndex field_index, | 69 MaybeHandle<Map> transition_map, FieldIndex field_index, |
68 Type* field_type, Type* receiver_type); | 70 Type* field_type, Type* receiver_type); |
69 | 71 |
70 Kind kind_; | 72 Kind kind_; |
71 Type* receiver_type_; | 73 Type* receiver_type_; |
72 Handle<Object> constant_; | 74 Handle<Object> constant_; |
(...skipping 11 matching lines...) Expand all Loading... |
84 Handle<Context> native_context, Zone* zone); | 86 Handle<Context> native_context, Zone* zone); |
85 | 87 |
86 bool ComputePropertyAccessInfo(Handle<Map> map, Handle<Name> name, | 88 bool ComputePropertyAccessInfo(Handle<Map> map, Handle<Name> name, |
87 PropertyAccessMode access_mode, | 89 PropertyAccessMode access_mode, |
88 PropertyAccessInfo* access_info); | 90 PropertyAccessInfo* access_info); |
89 bool ComputePropertyAccessInfos(MapHandleList const& maps, Handle<Name> name, | 91 bool ComputePropertyAccessInfos(MapHandleList const& maps, Handle<Name> name, |
90 PropertyAccessMode access_mode, | 92 PropertyAccessMode access_mode, |
91 ZoneVector<PropertyAccessInfo>* access_infos); | 93 ZoneVector<PropertyAccessInfo>* access_infos); |
92 | 94 |
93 private: | 95 private: |
| 96 bool LookupSpecialFieldAccessor(Handle<Map> map, Handle<Name> name, |
| 97 PropertyAccessInfo* access_info); |
| 98 bool LookupTransition(Handle<Map> map, Handle<Name> name, |
| 99 MaybeHandle<JSObject> holder, |
| 100 PropertyAccessInfo* access_info); |
| 101 |
94 CompilationDependencies* dependencies() const { return dependencies_; } | 102 CompilationDependencies* dependencies() const { return dependencies_; } |
95 Factory* factory() const; | 103 Factory* factory() const; |
96 Isolate* isolate() const { return isolate_; } | 104 Isolate* isolate() const { return isolate_; } |
97 Handle<Context> native_context() const { return native_context_; } | 105 Handle<Context> native_context() const { return native_context_; } |
98 Zone* zone() const { return zone_; } | 106 Zone* zone() const { return zone_; } |
99 | 107 |
100 CompilationDependencies* const dependencies_; | 108 CompilationDependencies* const dependencies_; |
101 Handle<Context> const native_context_; | 109 Handle<Context> const native_context_; |
102 Isolate* const isolate_; | 110 Isolate* const isolate_; |
103 TypeCache const& type_cache_; | 111 TypeCache const& type_cache_; |
104 Zone* const zone_; | 112 Zone* const zone_; |
105 | 113 |
106 DISALLOW_COPY_AND_ASSIGN(PropertyAccessInfoFactory); | 114 DISALLOW_COPY_AND_ASSIGN(PropertyAccessInfoFactory); |
107 }; | 115 }; |
108 | 116 |
109 } // namespace compiler | 117 } // namespace compiler |
110 } // namespace internal | 118 } // namespace internal |
111 } // namespace v8 | 119 } // namespace v8 |
112 | 120 |
113 #endif // V8_COMPILER_PROPERTY_ACCESS_INFO_H_ | 121 #endif // V8_COMPILER_PROPERTY_ACCESS_INFO_H_ |
OLD | NEW |