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

Unified Diff: src/compiler/access-info.h

Issue 1452563002: [turbofan] Add support for elements kind transitions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler/access-info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/access-info.h
diff --git a/src/compiler/access-info.h b/src/compiler/access-info.h
index 4f60552111077b7322e48f416d726cb6d21c03ff..1556e0ee3838482ddcca8f07d4deaeefa3df7a9f 100644
--- a/src/compiler/access-info.h
+++ b/src/compiler/access-info.h
@@ -28,24 +28,28 @@ enum class AccessMode { kLoad, kStore };
std::ostream& operator<<(std::ostream&, AccessMode);
+// Mapping of transition source to transition target.
+typedef std::vector<std::pair<Handle<Map>, Handle<Map>>> MapTransitionList;
+
+
// This class encapsulates all information required to access a certain element.
class ElementAccessInfo final {
public:
ElementAccessInfo();
ElementAccessInfo(Type* receiver_type, ElementsKind elements_kind,
- MaybeHandle<JSObject> holder)
- : elements_kind_(elements_kind),
- holder_(holder),
- receiver_type_(receiver_type) {}
+ MaybeHandle<JSObject> holder);
MaybeHandle<JSObject> holder() const { return holder_; }
ElementsKind elements_kind() const { return elements_kind_; }
Type* receiver_type() const { return receiver_type_; }
+ MapTransitionList& transitions() { return transitions_; }
+ MapTransitionList const& transitions() const { return transitions_; }
private:
ElementsKind elements_kind_;
MaybeHandle<JSObject> holder_;
Type* receiver_type_;
+ MapTransitionList transitions_;
};
« no previous file with comments | « no previous file | src/compiler/access-info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698