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

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

Issue 2227493002: [turbofan] Add initial support for growing stores. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add comments. 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
« no previous file with comments | « src/compiler/simplified-operator.h ('k') | src/compiler/typer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/simplified-operator.cc
diff --git a/src/compiler/simplified-operator.cc b/src/compiler/simplified-operator.cc
index ea271677536b9171ca3704b48d105c80d001aa87..52544e2b8368ea34685b8ae325135a9b5e68bea0 100644
--- a/src/compiler/simplified-operator.cc
+++ b/src/compiler/simplified-operator.cc
@@ -249,6 +249,31 @@ CheckTaggedHoleMode CheckTaggedHoleModeOf(const Operator* op) {
return OpParameter<CheckTaggedHoleMode>(op);
}
+std::ostream& operator<<(std::ostream& os, GrowFastElementsFlags flags) {
+ bool empty = true;
+ if (flags & GrowFastElementsFlag::kArrayObject) {
+ os << "ArrayObject";
+ empty = false;
+ }
+ if (flags & GrowFastElementsFlag::kDoubleElements) {
+ if (!empty) os << "|";
+ os << "DoubleElements";
+ empty = false;
+ }
+ if (flags & GrowFastElementsFlag::kHoleyElements) {
+ if (!empty) os << "|";
+ os << "HoleyElements";
+ empty = false;
+ }
+ if (empty) os << "None";
+ return os;
+}
+
+GrowFastElementsFlags GrowFastElementsFlagsOf(const Operator* op) {
+ DCHECK_EQ(IrOpcode::kMaybeGrowFastElements, op->opcode());
+ return OpParameter<GrowFastElementsFlags>(op);
+}
+
size_t hash_value(ElementsTransition transition) {
return static_cast<uint8_t>(transition);
}
@@ -654,6 +679,16 @@ const Operator* SimplifiedOperatorBuilder::EnsureWritableFastElements() {
return &cache_.kEnsureWritableFastElements;
}
+const Operator* SimplifiedOperatorBuilder::MaybeGrowFastElements(
+ GrowFastElementsFlags flags) {
+ return new (zone()) Operator1<GrowFastElementsFlags>( // --
+ IrOpcode::kMaybeGrowFastElements, // opcode
+ Operator::kNoThrow, // flags
+ "MaybeGrowFastElements", // name
+ 4, 1, 1, 1, 1, 0, // counts
+ flags); // parameter
+}
+
const Operator* SimplifiedOperatorBuilder::TransitionElementsKind(
ElementsTransition transition) {
return new (zone()) Operator1<ElementsTransition>( // --
« no previous file with comments | « src/compiler/simplified-operator.h ('k') | src/compiler/typer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698