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

Unified Diff: src/hydrogen-instructions.cc

Issue 958053003: Removed funky Maybe constructor and made fields private. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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/hydrogen.cc ('k') | src/hydrogen-representation-changes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.cc
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
index b89bcc4d99f443d5b0095c9ddfd16c658872c3ee..72744df8e0a51f811cd0407147d314274b55660a 100644
--- a/src/hydrogen-instructions.cc
+++ b/src/hydrogen-instructions.cc
@@ -2946,7 +2946,7 @@ Maybe<HConstant*> HConstant::CopyToTruncatedInt32(Zone* zone) {
HConstant(DoubleToInt32(double_value_), Representation::Integer32(),
NotInNewSpace(), object_);
}
- return Maybe<HConstant*>(res != NULL, res);
+ return res != NULL ? Just(res) : Nothing<HConstant*>();
}
@@ -2962,7 +2962,7 @@ Maybe<HConstant*> HConstant::CopyToTruncatedNumber(Isolate* isolate,
} else if (handle->IsNull()) {
res = new(zone) HConstant(0);
}
- return Maybe<HConstant*>(res != NULL, res);
+ return res != NULL ? Just(res) : Nothing<HConstant*>();
}
« no previous file with comments | « src/hydrogen.cc ('k') | src/hydrogen-representation-changes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698