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

Unified Diff: src/hydrogen.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/contexts.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index e37a1cee9a48534007617df4bb11b93b01f6bd2e..2cb64ff94e619e2cf77ba27931ae103b9d8ce860 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -10341,9 +10341,9 @@ HValue* HGraphBuilder::TruncateToNumber(HValue* value, Type** expected) {
HConstant* constant = HConstant::cast(value);
Maybe<HConstant*> number =
constant->CopyToTruncatedNumber(isolate(), zone());
- if (number.has_value) {
+ if (number.IsJust()) {
*expected = Type::Number(zone());
- return AddInstruction(number.value);
+ return AddInstruction(number.FromJust());
}
}
@@ -10564,10 +10564,10 @@ HValue* HGraphBuilder::BuildBinaryOperation(
instr = AddUncasted<HMul>(left, right);
break;
case Token::MOD: {
- if (fixed_right_arg.has_value &&
- !right->EqualsInteger32Constant(fixed_right_arg.value)) {
- HConstant* fixed_right = Add<HConstant>(
- static_cast<int>(fixed_right_arg.value));
+ if (fixed_right_arg.IsJust() &&
+ !right->EqualsInteger32Constant(fixed_right_arg.FromJust())) {
+ HConstant* fixed_right =
+ Add<HConstant>(static_cast<int>(fixed_right_arg.FromJust()));
IfBuilder if_same(this);
if_same.If<HCompareNumericAndBranch>(right, fixed_right, Token::EQ);
if_same.Then();
« no previous file with comments | « src/contexts.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698