Index: src/compiler/machine-operator.cc |
diff --git a/src/compiler/machine-operator.cc b/src/compiler/machine-operator.cc |
index 2fa550b623b1fe44cc134e9838f4b0499b07a38f..0cfa671e6b10c50d872f1cb032cb5b4a39a3af3f 100644 |
--- a/src/compiler/machine-operator.cc |
+++ b/src/compiler/machine-operator.cc |
@@ -537,6 +537,11 @@ struct MachineOperatorGlobalCache { |
DebugBreakOperator kDebugBreak; |
}; |
+struct CommentOperator : public Operator1<const char*> { |
+ explicit CommentOperator(const char* msg) |
+ : Operator1<const char*>(IrOpcode::kComment, Operator::kNoThrow, |
+ "Comment", 0, 0, 0, 0, 0, 0, msg) {} |
+}; |
static base::LazyInstance<MachineOperatorGlobalCache>::type kCache = |
LAZY_INSTANCE_INITIALIZER; |
@@ -544,7 +549,8 @@ static base::LazyInstance<MachineOperatorGlobalCache>::type kCache = |
MachineOperatorBuilder::MachineOperatorBuilder( |
Zone* zone, MachineRepresentation word, Flags flags, |
AlignmentRequirements alignmentRequirements) |
- : cache_(kCache.Get()), |
+ : zone_(zone), |
+ cache_(kCache.Get()), |
word_(word), |
flags_(flags), |
alignment_requirements_(alignmentRequirements) { |
@@ -619,6 +625,10 @@ const Operator* MachineOperatorBuilder::DebugBreak() { |
return &cache_.kDebugBreak; |
} |
+const Operator* MachineOperatorBuilder::Comment(const char* msg) { |
+ return new (zone_) CommentOperator(msg); |
+} |
+ |
const Operator* MachineOperatorBuilder::CheckedLoad( |
CheckedLoadRepresentation rep) { |
#define LOAD(Type) \ |