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

Unified Diff: src/builtins/builtins-math.cc

Issue 2396353002: Revert "Add Smi::Zero and replace all Smi::FromInt(0) calls" (Closed)
Patch Set: Created 4 years, 2 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/builtins/builtins-function.cc ('k') | src/builtins/builtins-regexp.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/builtins-math.cc
diff --git a/src/builtins/builtins-math.cc b/src/builtins/builtins-math.cc
index 6058f12265a36fd3380f02ebf3e07865c0a905e6..e8d429ebac92d969e09d5fc6b7dbeee056627e2b 100644
--- a/src/builtins/builtins-math.cc
+++ b/src/builtins/builtins-math.cc
@@ -316,7 +316,7 @@ void Builtins::Generate_MathFround(CodeStubAssembler* assembler) {
BUILTIN(MathHypot) {
HandleScope scope(isolate);
int const length = args.length() - 1;
- if (length == 0) return Smi::kZero;
+ if (length == 0) return Smi::FromInt(0);
DCHECK_LT(0, length);
double max = 0;
bool one_arg_is_nan = false;
@@ -345,7 +345,7 @@ BUILTIN(MathHypot) {
}
if (max == 0) {
- return Smi::kZero;
+ return Smi::FromInt(0);
}
DCHECK_GT(max, 0);
« no previous file with comments | « src/builtins/builtins-function.cc ('k') | src/builtins/builtins-regexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698