Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(402)

Side by Side Diff: src/compiler/access-info.h

Issue 2198833002: [turbofan] Remove unnecessary prototype checks for element access. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_ACCESS_INFO_H_ 5 #ifndef V8_COMPILER_ACCESS_INFO_H_
6 #define V8_COMPILER_ACCESS_INFO_H_ 6 #define V8_COMPILER_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 17 matching lines...) Expand all
28 28
29 typedef std::vector<Handle<Map>> MapList; 29 typedef std::vector<Handle<Map>> MapList;
30 30
31 // Mapping of transition source to transition target. 31 // Mapping of transition source to transition target.
32 typedef std::vector<std::pair<Handle<Map>, Handle<Map>>> MapTransitionList; 32 typedef std::vector<std::pair<Handle<Map>, Handle<Map>>> MapTransitionList;
33 33
34 // This class encapsulates all information required to access a certain element. 34 // This class encapsulates all information required to access a certain element.
35 class ElementAccessInfo final { 35 class ElementAccessInfo final {
36 public: 36 public:
37 ElementAccessInfo(); 37 ElementAccessInfo();
38 ElementAccessInfo(MapList const& receiver_maps, ElementsKind elements_kind, 38 ElementAccessInfo(MapList const& receiver_maps, ElementsKind elements_kind);
39 MaybeHandle<JSObject> holder);
40 39
41 MaybeHandle<JSObject> holder() const { return holder_; }
42 ElementsKind elements_kind() const { return elements_kind_; } 40 ElementsKind elements_kind() const { return elements_kind_; }
43 MapList const& receiver_maps() const { return receiver_maps_; } 41 MapList const& receiver_maps() const { return receiver_maps_; }
44 MapTransitionList& transitions() { return transitions_; } 42 MapTransitionList& transitions() { return transitions_; }
45 MapTransitionList const& transitions() const { return transitions_; } 43 MapTransitionList const& transitions() const { return transitions_; }
46 44
47 private: 45 private:
48 ElementsKind elements_kind_; 46 ElementsKind elements_kind_;
49 MaybeHandle<JSObject> holder_;
50 MapList receiver_maps_; 47 MapList receiver_maps_;
51 MapTransitionList transitions_; 48 MapTransitionList transitions_;
52 }; 49 };
53 50
54 // This class encapsulates all information required to access a certain 51 // This class encapsulates all information required to access a certain
55 // object property, either on the object itself or on the prototype chain. 52 // object property, either on the object itself or on the prototype chain.
56 class PropertyAccessInfo final { 53 class PropertyAccessInfo final {
57 public: 54 public:
58 enum Kind { 55 enum Kind {
59 kInvalid, 56 kInvalid,
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 Zone* const zone_; 149 Zone* const zone_;
153 150
154 DISALLOW_COPY_AND_ASSIGN(AccessInfoFactory); 151 DISALLOW_COPY_AND_ASSIGN(AccessInfoFactory);
155 }; 152 };
156 153
157 } // namespace compiler 154 } // namespace compiler
158 } // namespace internal 155 } // namespace internal
159 } // namespace v8 156 } // namespace v8
160 157
161 #endif // V8_COMPILER_ACCESS_INFO_H_ 158 #endif // V8_COMPILER_ACCESS_INFO_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler/access-info.cc » ('j') | src/compiler/js-native-context-specialization.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698