Index: src/regexp/jsregexp.cc |
diff --git a/src/regexp/jsregexp.cc b/src/regexp/jsregexp.cc |
index c0897bebcff36bf638b989460c47577048d1caaf..96a778cfb7ce2fd1f0f6158fd06aac7fa7f5fb39 100644 |
--- a/src/regexp/jsregexp.cc |
+++ b/src/regexp/jsregexp.cc |
@@ -417,7 +417,7 @@ void RegExpImpl::SetIrregexpMaxRegisterCount(FixedArray* re, int value) { |
void RegExpImpl::SetIrregexpCaptureNameMap(FixedArray* re, |
Handle<FixedArray> value) { |
if (value.is_null()) { |
- re->set(JSRegExp::kIrregexpCaptureNameMapIndex, Smi::kZero); |
+ re->set(JSRegExp::kIrregexpCaptureNameMapIndex, Smi::FromInt(0)); |
} else { |
re->set(JSRegExp::kIrregexpCaptureNameMapIndex, *value); |
} |
@@ -6781,10 +6781,10 @@ Object* RegExpResultsCache::Lookup(Heap* heap, String* key_string, |
FixedArray** last_match_cache, |
ResultsCacheType type) { |
FixedArray* cache; |
- if (!key_string->IsInternalizedString()) return Smi::kZero; |
+ if (!key_string->IsInternalizedString()) return Smi::FromInt(0); |
if (type == STRING_SPLIT_SUBSTRINGS) { |
DCHECK(key_pattern->IsString()); |
- if (!key_pattern->IsInternalizedString()) return Smi::kZero; |
+ if (!key_pattern->IsInternalizedString()) return Smi::FromInt(0); |
cache = heap->string_split_cache(); |
} else { |
DCHECK(type == REGEXP_MULTIPLE_INDICES); |
@@ -6801,7 +6801,7 @@ Object* RegExpResultsCache::Lookup(Heap* heap, String* key_string, |
((index + kArrayEntriesPerCacheEntry) & (kRegExpResultsCacheSize - 1)); |
if (cache->get(index + kStringOffset) != key_string || |
cache->get(index + kPatternOffset) != key_pattern) { |
- return Smi::kZero; |
+ return Smi::FromInt(0); |
} |
} |
@@ -6831,7 +6831,7 @@ void RegExpResultsCache::Enter(Isolate* isolate, Handle<String> key_string, |
uint32_t hash = key_string->Hash(); |
uint32_t index = ((hash & (kRegExpResultsCacheSize - 1)) & |
~(kArrayEntriesPerCacheEntry - 1)); |
- if (cache->get(index + kStringOffset) == Smi::kZero) { |
+ if (cache->get(index + kStringOffset) == Smi::FromInt(0)) { |
cache->set(index + kStringOffset, *key_string); |
cache->set(index + kPatternOffset, *key_pattern); |
cache->set(index + kArrayOffset, *value_array); |
@@ -6839,16 +6839,16 @@ void RegExpResultsCache::Enter(Isolate* isolate, Handle<String> key_string, |
} else { |
uint32_t index2 = |
((index + kArrayEntriesPerCacheEntry) & (kRegExpResultsCacheSize - 1)); |
- if (cache->get(index2 + kStringOffset) == Smi::kZero) { |
+ if (cache->get(index2 + kStringOffset) == Smi::FromInt(0)) { |
cache->set(index2 + kStringOffset, *key_string); |
cache->set(index2 + kPatternOffset, *key_pattern); |
cache->set(index2 + kArrayOffset, *value_array); |
cache->set(index2 + kLastMatchOffset, *last_match_cache); |
} else { |
- cache->set(index2 + kStringOffset, Smi::kZero); |
- cache->set(index2 + kPatternOffset, Smi::kZero); |
- cache->set(index2 + kArrayOffset, Smi::kZero); |
- cache->set(index2 + kLastMatchOffset, Smi::kZero); |
+ cache->set(index2 + kStringOffset, Smi::FromInt(0)); |
+ cache->set(index2 + kPatternOffset, Smi::FromInt(0)); |
+ cache->set(index2 + kArrayOffset, Smi::FromInt(0)); |
+ cache->set(index2 + kLastMatchOffset, Smi::FromInt(0)); |
cache->set(index + kStringOffset, *key_string); |
cache->set(index + kPatternOffset, *key_pattern); |
cache->set(index + kArrayOffset, *value_array); |
@@ -6871,7 +6871,7 @@ void RegExpResultsCache::Enter(Isolate* isolate, Handle<String> key_string, |
void RegExpResultsCache::Clear(FixedArray* cache) { |
for (int i = 0; i < kRegExpResultsCacheSize; i++) { |
- cache->set(i, Smi::kZero); |
+ cache->set(i, Smi::FromInt(0)); |
} |
} |