Index: src/compiler/simplified-operator.h |
diff --git a/src/compiler/simplified-operator.h b/src/compiler/simplified-operator.h |
index ed4f0cfe3dfd1b045e55db14296301f64d595956..532f56e2913028e4eb681d583f15bbd66fdbfada 100644 |
--- a/src/compiler/simplified-operator.h |
+++ b/src/compiler/simplified-operator.h |
@@ -245,8 +245,25 @@ NumberOperationHint NumberOperationHintOf(const Operator* op) |
int FormalParameterCountOf(const Operator* op) WARN_UNUSED_RESULT; |
bool IsRestLengthOf(const Operator* op) WARN_UNUSED_RESULT; |
+struct AllocationParameters { |
Benedikt Meurer
2017/04/06 12:08:05
Nit: AllocateParameters
Jarin
2017/04/06 15:11:29
Done.
|
+ Type* type; |
Benedikt Meurer
2017/04/06 12:08:05
Can we please stick to classes here?
Jarin
2017/04/06 15:11:29
Done.
Out of curiosity, what is the rationale beh
Benedikt Meurer
2017/04/06 17:22:28
I'd like to have some consistency. Switching to st
|
+ PretenureFlag pretenure; |
+ |
+ AllocationParameters(Type* type, PretenureFlag pretenure) |
+ : type(type), pretenure(pretenure) {} |
+}; |
+ |
+size_t hash_value(AllocationParameters); |
+ |
+V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream&, AllocationParameters); |
+ |
+bool operator==(AllocationParameters const&, AllocationParameters const&); |
+bool operator!=(AllocationParameters const&, AllocationParameters 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 +459,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&); |