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

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

Issue 1772803003: [turbofan] Thread through object boilerplate length. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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-operator.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-operator.cc
diff --git a/src/compiler/js-operator.cc b/src/compiler/js-operator.cc
index 5fcd51928d64307b57bc6f778733d6a21d2a47db..a3ff809ed6dea228be2292b7b841eb5482225614 100644
--- a/src/compiler/js-operator.cc
+++ b/src/compiler/js-operator.cc
@@ -346,7 +346,8 @@ const CreateClosureParameters& CreateClosureParametersOf(const Operator* op) {
bool operator==(CreateLiteralParameters const& lhs,
CreateLiteralParameters const& rhs) {
return lhs.constant().location() == rhs.constant().location() &&
- lhs.flags() == rhs.flags() && lhs.index() == rhs.index();
+ lhs.length() == rhs.length() && lhs.flags() == rhs.flags() &&
+ lhs.index() == rhs.index();
}
@@ -357,12 +358,14 @@ bool operator!=(CreateLiteralParameters const& lhs,
size_t hash_value(CreateLiteralParameters const& p) {
- return base::hash_combine(p.constant().location(), p.flags(), p.index());
+ return base::hash_combine(p.constant().location(), p.length(), p.flags(),
+ p.index());
}
std::ostream& operator<<(std::ostream& os, CreateLiteralParameters const& p) {
- return os << Brief(*p.constant()) << ", " << p.flags() << ", " << p.index();
+ return os << Brief(*p.constant()) << ", " << p.length() << ", " << p.flags()
+ << ", " << p.index();
}
@@ -733,12 +736,11 @@ const Operator* JSOperatorBuilder::CreateClosure(
parameters); // parameter
}
-
const Operator* JSOperatorBuilder::CreateLiteralArray(
- Handle<FixedArray> constant_elements, int literal_flags,
- int literal_index) {
- CreateLiteralParameters parameters(constant_elements, literal_flags,
- literal_index);
+ Handle<FixedArray> constant_elements, int literal_flags, int literal_index,
+ int number_of_elements) {
+ CreateLiteralParameters parameters(constant_elements, number_of_elements,
+ literal_flags, literal_index);
return new (zone()) Operator1<CreateLiteralParameters>( // --
IrOpcode::kJSCreateLiteralArray, Operator::kNoProperties, // opcode
"JSCreateLiteralArray", // name
@@ -746,12 +748,11 @@ const Operator* JSOperatorBuilder::CreateLiteralArray(
parameters); // parameter
}
-
const Operator* JSOperatorBuilder::CreateLiteralObject(
Handle<FixedArray> constant_properties, int literal_flags,
- int literal_index) {
- CreateLiteralParameters parameters(constant_properties, literal_flags,
- literal_index);
+ int literal_index, int number_of_properties) {
+ CreateLiteralParameters parameters(constant_properties, number_of_properties,
+ literal_flags, literal_index);
return new (zone()) Operator1<CreateLiteralParameters>( // --
IrOpcode::kJSCreateLiteralObject, Operator::kNoProperties, // opcode
"JSCreateLiteralObject", // name
@@ -762,7 +763,7 @@ const Operator* JSOperatorBuilder::CreateLiteralObject(
const Operator* JSOperatorBuilder::CreateLiteralRegExp(
Handle<String> constant_pattern, int literal_flags, int literal_index) {
- CreateLiteralParameters parameters(constant_pattern, literal_flags,
+ CreateLiteralParameters parameters(constant_pattern, -1, literal_flags,
literal_index);
return new (zone()) Operator1<CreateLiteralParameters>( // --
IrOpcode::kJSCreateLiteralRegExp, Operator::kNoProperties, // opcode
« no previous file with comments | « src/compiler/js-operator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698