Revision: 15025
Author: [email protected]
Date: Mon Jun 10 00:56:17 2013
Log: build fix for 15023
[email protected]
BUG=
Review URL: https://codereview.chromium.org/16729002
http://code.google.com/p/v8/source/detail?r=15025
Modified:
/branches/bleeding_edge/src/api.cc
=======================================
--- /branches/bleeding_edge/src/api.cc Mon Jun 10 00:34:58 2013
+++ /branches/bleeding_edge/src/api.cc Mon Jun 10 00:56:17 2013
@@ -4303,6 +4303,23 @@
return str->HasOnlyOneByteChars();
}
+// Helpers for ContainsOnlyOneByteHelper
+template<size_t size> struct OneByteMask;
+template<> struct OneByteMask<4> {
+ static const uint32_t value = 0xFF00FF00;
+};
+template<> struct OneByteMask<8> {
+ static const uint64_t value = 0xFF00FF00FF00FF00;
+};
+static const uintptr_t kOneByteMask =
OneByteMask<sizeof(uintptr_t)>::value;
+static const uintptr_t kAlignmentMask = sizeof(uintptr_t) - 1;
+static inline bool Unaligned(const uint16_t* chars) {
+ return reinterpret_cast<const uintptr_t>(chars) & kAlignmentMask;
+}
+static inline const uint16_t* Align(const uint16_t* chars) {
+ return reinterpret_cast<uint16_t*>(
+ reinterpret_cast<uintptr_t>(chars) & ~kAlignmentMask);
+}
class ContainsOnlyOneByteHelper {
public:
@@ -4348,16 +4365,6 @@
}
private:
- static const uintptr_t kOneByteMask =
- static_cast<uintptr_t>(0xFF00FF00FF00FF00ULL);
- static const uintptr_t kAlignmentMask = sizeof(uintptr_t) - 1;
- static inline bool Unaligned(const uint16_t* chars) {
- return reinterpret_cast<const uintptr_t>(chars) & kAlignmentMask;
- }
- static inline const uint16_t* Align(const uint16_t* chars) {
- return reinterpret_cast<uint16_t*>(
- reinterpret_cast<uintptr_t>(chars) & ~kAlignmentMask);
- }
bool CheckCons(i::ConsString* cons_string) {
while (true) {
// Check left side if flat.
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.