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

Unified Diff: src/crankshaft/hydrogen.cc

Issue 2629493002: Revert of [crankshaft] Also inline Math.ceil. (Closed)
Patch Set: Created 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/hydrogen.cc
diff --git a/src/crankshaft/hydrogen.cc b/src/crankshaft/hydrogen.cc
index b2c09d1e31d62d2421b72cb06c2a229ec1e05218..2d0f755e4e3bf874ea2c3c8e01ec0d9ca85b18b3 100644
--- a/src/crankshaft/hydrogen.cc
+++ b/src/crankshaft/hydrogen.cc
@@ -8366,23 +8366,6 @@
return true;
}
break;
- case kMathCeil:
- if (expr->arguments()->length() == 1) {
- // Math.ceil(x) = -Math.floor(-x)
- HValue* minus_zero = Add<HConstant>(-0.0);
- HValue* argument = Pop();
- Drop(2); // Receiver and function.
- argument = AddUncasted<HSub>(minus_zero, argument);
- Add<HSimulate>(expr->id(), REMOVABLE_SIMULATE);
- {
- NoObservableSideEffectsScope scope(this);
- argument = AddUncasted<HUnaryMathOperation>(argument, kMathFloor);
- argument = AddUncasted<HSub>(minus_zero, argument);
- }
- ast_context()->ReturnValue(argument);
- return true;
- }
- break;
case kMathImul:
if (expr->arguments()->length() == 2) {
HValue* right = Pop();
@@ -8580,23 +8563,6 @@
Drop(2); // Receiver and function.
HInstruction* op = NewUncasted<HUnaryMathOperation>(argument, id);
ast_context()->ReturnInstruction(op, ast_id);
- return true;
- }
- break;
- case kMathCeil:
- if (argument_count == 2) {
- // Math.ceil(x) = -Math.floor(-x)
- HValue* minus_zero = Add<HConstant>(-0.0);
- HValue* argument = Pop();
- Drop(2); // Receiver and function.
- argument = AddUncasted<HSub>(minus_zero, argument);
- Add<HSimulate>(ast_id, REMOVABLE_SIMULATE);
- {
- NoObservableSideEffectsScope scope(this);
- argument = AddUncasted<HUnaryMathOperation>(argument, kMathFloor);
- argument = AddUncasted<HSub>(minus_zero, argument);
- }
- ast_context()->ReturnValue(argument);
return true;
}
break;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698