Commit 2974f2c1 authored by Mostyn Bramley-Moore's avatar Mostyn Bramley-Moore Committed by Commit Bot

[jumbo] namespace fix for CountTrailingZeros

Arm64 jumbo builds might otherwise select the CountTrailingZeros function
from utils-arm64.h as a closer match, and fail to build due to differences
in the function prototype.

Bug: chromium:782640
Change-Id: Ie26d71b34aaf0e3ae5020597fed506df83b7d0ea
Reviewed-on: https://chromium-review.googlesource.com/758271Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Commit-Queue: Mostyn Bramley-Moore <mostynb@vewd.com>
Cr-Commit-Position: refs/heads/master@{#49226}
parent 9d557e0e
......@@ -10,8 +10,6 @@
#include "src/handles-inl.h"
#include "src/objects-inl.h"
using v8::base::bits::CountTrailingZeros;
namespace v8 {
namespace internal {
......@@ -144,7 +142,8 @@ bool LayoutDescriptor::IsTagged(int field_index, int max_sequence_length,
bool is_tagged = (value & layout_mask) == 0;
if (!is_tagged) value = ~value; // Count set bits instead of cleared bits.
value = value & ~(layout_mask - 1); // Clear bits we are not interested in.
int sequence_length = CountTrailingZeros(value) - layout_bit_index;
int sequence_length =
base::bits::CountTrailingZeros(value) - layout_bit_index;
if (layout_bit_index + sequence_length == kBitsPerLayoutWord) {
// This is a contiguous sequence till the end of current word, proceed
......@@ -157,7 +156,7 @@ bool LayoutDescriptor::IsTagged(int field_index, int max_sequence_length,
bool cur_is_tagged = (value & 1) == 0;
if (cur_is_tagged != is_tagged) break;
if (!is_tagged) value = ~value; // Count set bits instead.
int cur_sequence_length = CountTrailingZeros(value);
int cur_sequence_length = base::bits::CountTrailingZeros(value);
sequence_length += cur_sequence_length;
if (sequence_length >= max_sequence_length) break;
if (cur_sequence_length != kBitsPerLayoutWord) break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment