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

Unified Diff: src/ic/ic.cc

Issue 528993002: First step to cleanup the power-of-2 mess. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: clang-format Created 6 years, 3 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/ia32/macro-assembler-ia32.cc ('k') | src/ic/stub-cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/ic.cc
diff --git a/src/ic/ic.cc b/src/ic/ic.cc
index 5b7382f79a57ca6579332567a7a643161efe9c63..a7a04518f64ee794205b2b1d59d49da5b8dead07 100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -7,6 +7,7 @@
#include "src/accessors.h"
#include "src/api.h"
#include "src/arguments.h"
+#include "src/base/bits.h"
#include "src/codegen.h"
#include "src/conversions.h"
#include "src/execution.h"
@@ -2456,7 +2457,8 @@ void BinaryOpIC::State::Update(Handle<Object> left, Handle<Object> right,
int32_t fixed_right_arg_value = 0;
bool has_fixed_right_arg =
op_ == Token::MOD && right->ToInt32(&fixed_right_arg_value) &&
- fixed_right_arg_value > 0 && IsPowerOf2(fixed_right_arg_value) &&
+ fixed_right_arg_value > 0 &&
+ base::bits::IsPowerOfTwo32(fixed_right_arg_value) &&
FixedRightArgValueField::is_valid(WhichPowerOf2(fixed_right_arg_value)) &&
(left_kind_ == SMI || left_kind_ == INT32) &&
(result_kind_ == NONE || !fixed_right_arg_.has_value);
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/ic/stub-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698