summaryrefslogtreecommitdiff
path: root/deps/v8/src/compiler/js-operator.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/compiler/js-operator.cc')
-rw-r--r--deps/v8/src/compiler/js-operator.cc46
1 files changed, 41 insertions, 5 deletions
diff --git a/deps/v8/src/compiler/js-operator.cc b/deps/v8/src/compiler/js-operator.cc
index 5d45bb7f95..57f9950d55 100644
--- a/deps/v8/src/compiler/js-operator.cc
+++ b/deps/v8/src/compiler/js-operator.cc
@@ -363,7 +363,7 @@ CreateArgumentsType const& CreateArgumentsTypeOf(const Operator* op) {
bool operator==(CreateArrayParameters const& lhs,
CreateArrayParameters const& rhs) {
return lhs.arity() == rhs.arity() &&
- lhs.site().location() == rhs.site().location();
+ lhs.site().address() == rhs.site().address();
}
@@ -374,13 +374,14 @@ bool operator!=(CreateArrayParameters const& lhs,
size_t hash_value(CreateArrayParameters const& p) {
- return base::hash_combine(p.arity(), p.site().location());
+ return base::hash_combine(p.arity(), p.site().address());
}
std::ostream& operator<<(std::ostream& os, CreateArrayParameters const& p) {
os << p.arity();
- if (!p.site().is_null()) os << ", " << Brief(*p.site());
+ Handle<AllocationSite> site;
+ if (p.site().ToHandle(&site)) os << ", " << Brief(*site);
return os;
}
@@ -534,6 +535,29 @@ const CreateLiteralParameters& CreateLiteralParametersOf(const Operator* op) {
return OpParameter<CreateLiteralParameters>(op);
}
+bool operator==(CloneObjectParameters const& lhs,
+ CloneObjectParameters const& rhs) {
+ return lhs.feedback() == rhs.feedback() && lhs.flags() == rhs.flags();
+}
+
+bool operator!=(CloneObjectParameters const& lhs,
+ CloneObjectParameters const& rhs) {
+ return !(lhs == rhs);
+}
+
+size_t hash_value(CloneObjectParameters const& p) {
+ return base::hash_combine(p.feedback(), p.flags());
+}
+
+std::ostream& operator<<(std::ostream& os, CloneObjectParameters const& p) {
+ return os << p.flags();
+}
+
+const CloneObjectParameters& CloneObjectParametersOf(const Operator* op) {
+ DCHECK(op->opcode() == IrOpcode::kJSCloneObject);
+ return OpParameter<CloneObjectParameters>(op);
+}
+
size_t hash_value(ForInMode mode) { return static_cast<uint8_t>(mode); }
std::ostream& operator<<(std::ostream& os, ForInMode mode) {
@@ -589,6 +613,7 @@ CompareOperationHint CompareOperationHintOf(const Operator* op) {
V(ToLength, Operator::kNoProperties, 1, 1) \
V(ToName, Operator::kNoProperties, 1, 1) \
V(ToNumber, Operator::kNoProperties, 1, 1) \
+ V(ToNumberConvertBigInt, Operator::kNoProperties, 1, 1) \
V(ToNumeric, Operator::kNoProperties, 1, 1) \
V(ToObject, Operator::kFoldable, 1, 1) \
V(ToString, Operator::kNoProperties, 1, 1) \
@@ -1087,8 +1112,8 @@ const Operator* JSOperatorBuilder::CreateArguments(CreateArgumentsType type) {
type); // parameter
}
-const Operator* JSOperatorBuilder::CreateArray(size_t arity,
- Handle<AllocationSite> site) {
+const Operator* JSOperatorBuilder::CreateArray(
+ size_t arity, MaybeHandle<AllocationSite> site) {
// constructor, new_target, arg1, ..., argN
int const value_input_count = static_cast<int>(arity) + 2;
CreateArrayParameters parameters(arity, site);
@@ -1179,6 +1204,17 @@ const Operator* JSOperatorBuilder::CreateLiteralObject(
parameters); // parameter
}
+const Operator* JSOperatorBuilder::CloneObject(VectorSlotPair const& feedback,
+ int literal_flags) {
+ CloneObjectParameters parameters(feedback, literal_flags);
+ return new (zone()) Operator1<CloneObjectParameters>( // --
+ IrOpcode::kJSCloneObject, // opcode
+ Operator::kNoProperties, // properties
+ "JSCloneObject", // name
+ 1, 1, 1, 1, 1, 2, // counts
+ parameters); // parameter
+}
+
const Operator* JSOperatorBuilder::CreateEmptyLiteralObject() {
return new (zone()) Operator( // --
IrOpcode::kJSCreateEmptyLiteralObject, // opcode