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

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

Issue 2056503003: [turbofan] Add comments to CodeAssembler (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove extraneous change Created 4 years, 6 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/machine-operator.h ('k') | src/compiler/mips/code-generator-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) \
« no previous file with comments | « src/compiler/machine-operator.h ('k') | src/compiler/mips/code-generator-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698