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

Unified Diff: src/factory.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/conversions-inl.h ('k') | src/frames.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index 13cba9d6bb4e564428ac488a2c60ee39edd2c6c8..85713ee23f26a8239be20f344d515c8965fe7b04 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -5,6 +5,7 @@
#include "src/factory.h"
#include "src/allocation-site-scopes.h"
+#include "src/base/bits.h"
#include "src/conversions.h"
#include "src/isolate-inl.h"
#include "src/macro-assembler.h"
@@ -435,7 +436,8 @@ static inline Handle<String> MakeOrFindTwoCharacterString(Isolate* isolate,
// when building the new string.
if (static_cast<unsigned>(c1 | c2) <= String::kMaxOneByteCharCodeU) {
// We can do this.
- DCHECK(IsPowerOf2(String::kMaxOneByteCharCodeU + 1)); // because of this.
+ DCHECK(base::bits::IsPowerOfTwo32(String::kMaxOneByteCharCodeU +
+ 1)); // because of this.
Handle<SeqOneByteString> str =
isolate->factory()->NewRawOneByteString(2).ToHandleChecked();
uint8_t* dest = str->GetChars();
« no previous file with comments | « src/conversions-inl.h ('k') | src/frames.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698