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

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
Index: src/compiler/common-operator.h
diff --git a/src/compiler/common-operator.h b/src/compiler/common-operator.h
index 2d90e6489917d56bbe06e312015ef6942d60494a..738adece52c06bcb168a54600508f0d415c3fd07 100644
--- a/src/compiler/common-operator.h
+++ b/src/compiler/common-operator.h
@@ -156,6 +156,26 @@ 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);
+
Benedikt Meurer 2015/04/22 09:47:12 Please add an empty line here.
titzer 2015/04/22 09:50:01 Done.
// 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 +204,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();

Powered by Google App Engine
This is Rietveld 408576698