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

Unified Diff: src/compiler/node-matchers.h

Issue 1578723002: [turbofan] Build s/NULL/nullptr/g and CHECK(x != nullptr) to CHECK_NOT_NULL(x). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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/node-cache.h ('k') | src/compiler/node-properties.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/node-matchers.h
diff --git a/src/compiler/node-matchers.h b/src/compiler/node-matchers.h
index bafe3daa683b7ef7f937ef5268f5c520b3f56d02..37d0e1a561b5e0446c976581dea81f242a0b626a 100644
--- a/src/compiler/node-matchers.h
+++ b/src/compiler/node-matchers.h
@@ -384,19 +384,19 @@ template <class AddMatcher>
struct BaseWithIndexAndDisplacementMatcher {
BaseWithIndexAndDisplacementMatcher(Node* node, bool allow_input_swap)
: matches_(false),
- index_(NULL),
+ index_(nullptr),
scale_(0),
- base_(NULL),
- displacement_(NULL) {
+ base_(nullptr),
+ displacement_(nullptr) {
Initialize(node, allow_input_swap);
}
explicit BaseWithIndexAndDisplacementMatcher(Node* node)
: matches_(false),
- index_(NULL),
+ index_(nullptr),
scale_(0),
- base_(NULL),
- displacement_(NULL) {
+ base_(nullptr),
+ displacement_(nullptr) {
Initialize(node, node->op()->HasProperty(Operator::kCommutative));
}
@@ -434,10 +434,10 @@ struct BaseWithIndexAndDisplacementMatcher {
AddMatcher m(node, allow_input_swap);
Node* left = m.left().node();
Node* right = m.right().node();
- Node* displacement = NULL;
- Node* base = NULL;
- Node* index = NULL;
- Node* scale_expression = NULL;
+ Node* displacement = nullptr;
+ Node* base = nullptr;
+ Node* index = nullptr;
+ Node* scale_expression = nullptr;
bool power_of_two_plus_one = false;
int scale = 0;
if (m.HasIndexInput() && left->OwnedBy(node)) {
@@ -519,7 +519,7 @@ struct BaseWithIndexAndDisplacementMatcher {
}
}
int64_t value = 0;
- if (displacement != NULL) {
+ if (displacement != nullptr) {
switch (displacement->opcode()) {
case IrOpcode::kInt32Constant: {
value = OpParameter<int32_t>(displacement);
@@ -534,11 +534,11 @@ struct BaseWithIndexAndDisplacementMatcher {
break;
}
if (value == 0) {
- displacement = NULL;
+ displacement = nullptr;
}
}
if (power_of_two_plus_one) {
- if (base != NULL) {
+ if (base != nullptr) {
// If the scale requires explicitly using the index as the base, but a
// base is already part of the match, then the (1 << N + 1) scale factor
// can't be folded into the match and the entire index * scale
« no previous file with comments | « src/compiler/node-cache.h ('k') | src/compiler/node-properties.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698