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

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

Issue 1344553003: [turbofan] Model arguments object materialization in graph. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix comment. 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
Index: src/compiler/js-operator.h
diff --git a/src/compiler/js-operator.h b/src/compiler/js-operator.h
index 4776a8fe30b88778cc7bde565088919d6ab6a430..98a26298289ad0d60213add4acfd392e803a8c9a 100644
--- a/src/compiler/js-operator.h
+++ b/src/compiler/js-operator.h
@@ -407,6 +407,32 @@ std::ostream& operator<<(std::ostream&, StorePropertyParameters const&);
const StorePropertyParameters& StorePropertyParametersOf(const Operator* op);
+// Defines specifics about arguments object or rest parameter creation. This is
+// used as a parameter by JSCreateArguments operators.
+class CreateArgumentsParameters final {
+ public:
+ enum Type { MAPPED_ARGUMENTS, UNMAPPED_ARGUMENTS, REST_ARRAY };
Benedikt Meurer 2015/09/15 04:35:50 Style guide nit: use kMappedArguments, kUnmappedAr
Michael Starzinger 2015/09/15 07:39:27 Done.
+ CreateArgumentsParameters(Type type, int start_index)
+ : type_(type), start_index_(start_index) {}
+
+ Type type() const { return type_; }
+ int start_index() const { return start_index_; }
+
+ private:
+ const Type type_;
+ const int start_index_;
+};
+
+bool operator==(CreateArgumentsParameters const&,
+ CreateArgumentsParameters const&);
+bool operator!=(CreateArgumentsParameters const&,
+ CreateArgumentsParameters const&);
+
+size_t hash_value(CreateArgumentsParameters const&);
+
+std::ostream& operator<<(std::ostream&, CreateArgumentsParameters const&);
+
+
// Defines shared information for the closure that should be created. This is
// used as a parameter by JSCreateClosure operators.
class CreateClosureParameters final {
@@ -469,6 +495,8 @@ class JSOperatorBuilder final : public ZoneObject {
const Operator* Yield();
const Operator* Create();
+ const Operator* CreateArguments(CreateArgumentsParameters::Type type,
+ int start_index);
const Operator* CreateClosure(Handle<SharedFunctionInfo> shared_info,
PretenureFlag pretenure);
const Operator* CreateLiteralArray(int literal_flags);

Powered by Google App Engine
This is Rietveld 408576698