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

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

Issue 2797993006: [turbofan] Add type to the allocation operator. (Closed)
Patch Set: Remove caching Created 3 years, 8 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/js-typed-lowering.cc ('k') | src/compiler/simplified-operator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/simplified-operator.h
diff --git a/src/compiler/simplified-operator.h b/src/compiler/simplified-operator.h
index ed4f0cfe3dfd1b045e55db14296301f64d595956..f0017970474549085966df937ebf4229e3885861 100644
--- a/src/compiler/simplified-operator.h
+++ b/src/compiler/simplified-operator.h
@@ -245,8 +245,30 @@ NumberOperationHint NumberOperationHintOf(const Operator* op)
int FormalParameterCountOf(const Operator* op) WARN_UNUSED_RESULT;
bool IsRestLengthOf(const Operator* op) WARN_UNUSED_RESULT;
+class AllocateParameters {
+ public:
+ AllocateParameters(Type* type, PretenureFlag pretenure)
+ : type_(type), pretenure_(pretenure) {}
+
+ Type* type() const { return type_; }
+ PretenureFlag pretenure() const { return pretenure_; }
+
+ private:
+ Type* type_;
+ PretenureFlag pretenure_;
+};
+
+size_t hash_value(AllocateParameters);
+
+V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream&, AllocateParameters);
+
+bool operator==(AllocateParameters const&, AllocateParameters const&);
+bool operator!=(AllocateParameters const&, AllocateParameters const&);
+
PretenureFlag PretenureFlagOf(const Operator* op) WARN_UNUSED_RESULT;
+Type* AllocateTypeOf(const Operator* op) WARN_UNUSED_RESULT;
+
UnicodeEncoding UnicodeEncodingOf(const Operator*) WARN_UNUSED_RESULT;
// Interface for building simplified operators, which represent the
@@ -442,7 +464,7 @@ class V8_EXPORT_PRIVATE SimplifiedOperatorBuilder final
// transition-elements-kind object, from-map, to-map
const Operator* TransitionElementsKind(ElementsTransition transition);
- const Operator* Allocate(PretenureFlag pretenure = NOT_TENURED);
+ const Operator* Allocate(Type* type, PretenureFlag pretenure = NOT_TENURED);
const Operator* LoadField(FieldAccess const&);
const Operator* StoreField(FieldAccess const&);
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | src/compiler/simplified-operator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698