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

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

Issue 1090303004: [turbofan] Add a debug_name to Parameter operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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/ast-graph-builder.cc ('k') | src/compiler/common-operator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/common-operator.h
diff --git a/src/compiler/common-operator.h b/src/compiler/common-operator.h
index 2d90e6489917d56bbe06e312015ef6942d60494a..a453b8159d62d242255eecfccbd30d4f6cfa4cb2 100644
--- a/src/compiler/common-operator.h
+++ b/src/compiler/common-operator.h
@@ -156,6 +156,27 @@ std::ostream& operator<<(std::ostream&, FrameStateCallInfo const&);
size_t ProjectionIndexOf(const Operator* const);
+// The {IrOpcode::kParameter} opcode represents an incoming parameter to the
+// function. This class bundles the index and a debug name for such operators.
+class ParameterInfo final {
+ public:
+ ParameterInfo(int index, const char* debug_name)
+ : index_(index), debug_name_(debug_name) {}
+
+ int index() const { return index_; }
+ const char* debug_name() const { return debug_name_; }
+
+ private:
+ int index_;
+ const char* debug_name_;
+};
+
+std::ostream& operator<<(std::ostream&, ParameterInfo const&);
+
+int ParameterIndexOf(const Operator* const);
+const ParameterInfo& ParameterInfoOf(const Operator* const);
+
+
// Interface for building common operators that can be used at any level of IR,
// including JavaScript, mid-level, and low-level.
class CommonOperatorBuilder final : public ZoneObject {
@@ -184,7 +205,7 @@ class CommonOperatorBuilder final : public ZoneObject {
const Operator* Start(int num_formal_parameters);
const Operator* Loop(int control_input_count);
const Operator* Merge(int control_input_count);
- const Operator* Parameter(int index);
+ const Operator* Parameter(int index, const char* debug_name = nullptr);
const Operator* OsrNormalEntry();
const Operator* OsrLoopEntry();
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/compiler/common-operator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698