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

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

Issue 1344553003: [turbofan] Model arguments object materialization in graph. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments. Created 5 years, 3 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') | src/compiler/opcodes.h » ('j') | 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 c486e02855d6f733e3012c7923c450116eff8268..975ca0c5b18be8009b049ef43ebac92bb2c56803 100644
--- a/src/compiler/js-operator.cc
+++ b/src/compiler/js-operator.cc
@@ -391,6 +391,28 @@ const StorePropertyParameters& StorePropertyParametersOf(const Operator* op) {
}
+bool operator==(CreateArgumentsParameters const& lhs,
+ CreateArgumentsParameters const& rhs) {
+ return lhs.type() == rhs.type() && lhs.start_index() == rhs.start_index();
+}
+
+
+bool operator!=(CreateArgumentsParameters const& lhs,
+ CreateArgumentsParameters const& rhs) {
+ return !(lhs == rhs);
+}
+
+
+size_t hash_value(CreateArgumentsParameters const& p) {
+ return base::hash_combine(p.type(), p.start_index());
+}
+
+
+std::ostream& operator<<(std::ostream& os, CreateArgumentsParameters const& p) {
+ return os << p.type() << ", " << p.start_index();
+}
+
+
bool operator==(CreateClosureParameters const& lhs,
CreateClosureParameters const& rhs) {
return lhs.pretenure() == rhs.pretenure() &&
@@ -705,6 +727,18 @@ const Operator* JSOperatorBuilder::LoadDynamicContext(
}
+const Operator* JSOperatorBuilder::CreateArguments(
+ CreateArgumentsParameters::Type type, int start_index) {
+ DCHECK_IMPLIES(start_index, type == CreateArgumentsParameters::kRestArray);
+ CreateArgumentsParameters parameters(type, start_index);
+ return new (zone()) Operator1<CreateArgumentsParameters>( // --
+ IrOpcode::kJSCreateArguments, Operator::kNoThrow, // opcode
+ "JSCreateArguments", // name
+ 1, 1, 1, 1, 1, 0, // counts
+ parameters); // parameter
+}
+
+
const Operator* JSOperatorBuilder::CreateClosure(
Handle<SharedFunctionInfo> shared_info, PretenureFlag pretenure) {
CreateClosureParameters parameters(shared_info, pretenure);
« no previous file with comments | « src/compiler/js-operator.h ('k') | src/compiler/opcodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698