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

Unified Diff: src/compiler/simplified-operator.h

Issue 2227493002: [turbofan] Add initial support for growing stores. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: src/compiler/simplified-operator.h
diff --git a/src/compiler/simplified-operator.h b/src/compiler/simplified-operator.h
index fac19f0882e6b02d2c52ec9a136577f6e5ebf9bd..981499e839daf3636e43e0eee255a2d7e32df1c8 100644
--- a/src/compiler/simplified-operator.h
+++ b/src/compiler/simplified-operator.h
@@ -142,6 +142,22 @@ std::ostream& operator<<(std::ostream&, CheckForMinusZeroMode);
CheckForMinusZeroMode CheckMinusZeroModeOf(const Operator*) WARN_UNUSED_RESULT;
+// A descriptor for growing elements backing stores.
+enum class GrowFastElementsFlag : uint8_t {
+ kNone = 0u,
+ kArrayObject = 1u << 0, // Update JSArray::length field.
+ kHoleyElements = 1u << 1, // Backing store is holey.
+ kDoubleElements = 1u << 2, // Backing store contains doubles.
+};
+typedef base::Flags<GrowFastElementsFlag> GrowFastElementsFlags;
+
+DEFINE_OPERATORS_FOR_FLAGS(GrowFastElementsFlags)
+
+std::ostream& operator<<(std::ostream&, GrowFastElementsFlags);
+
+GrowFastElementsFlags GrowFastElementsFlagsOf(const Operator*)
+ WARN_UNUSED_RESULT;
+
// A descriptor for elements kind transitions.
enum class ElementsTransition : uint8_t {
kFastTransition, // simple transition, just updating the map.
@@ -316,6 +332,9 @@ class SimplifiedOperatorBuilder final : public ZoneObject {
// ensure-writable-fast-elements object, elements
const Operator* EnsureWritableFastElements();
+ // maybe-grow-fast-elements object, elements, index, length
+ const Operator* MaybeGrowFastElements(GrowFastElementsFlags flags);
+
// transition-elements-kind object, from-map, to-map
const Operator* TransitionElementsKind(ElementsTransition transition);

Powered by Google App Engine
This is Rietveld 408576698