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

Unified Diff: src/elements.cc

Issue 2549773002: Internalize strings in-place (Closed)
Patch Set: rebased Created 3 years, 11 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/deoptimizer.cc ('k') | src/factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/elements.cc
diff --git a/src/elements.cc b/src/elements.cc
index d22b11ec8754863bb4e4bbd22141b8414e7501e1..12bc26506a46cad26257fff0eba531707fa81166 100644
--- a/src/elements.cc
+++ b/src/elements.cc
@@ -187,7 +187,7 @@ static void CopyDictionaryToObjectElements(
: SKIP_WRITE_BARRIER;
Isolate* isolate = from->GetIsolate();
for (int i = 0; i < copy_size; i++) {
- int entry = from->FindEntry(i + from_start);
+ int entry = from->FindEntry(isolate, i + from_start);
if (entry != SeededNumberDictionary::kNotFound) {
Object* value = from->ValueAt(entry);
DCHECK(!value->IsTheHole(isolate));
@@ -417,8 +417,9 @@ static void CopyDictionaryToDoubleElements(FixedArrayBase* from_base,
if (to_start + copy_size > to_length) {
copy_size = to_length - to_start;
}
+ Isolate* isolate = from->GetIsolate();
for (int i = 0; i < copy_size; i++) {
- int entry = from->FindEntry(i + from_start);
+ int entry = from->FindEntry(isolate, i + from_start);
if (entry != SeededNumberDictionary::kNotFound) {
to->set(i + to_start, from->ValueAt(entry)->Number());
} else {
@@ -1628,7 +1629,7 @@ class DictionaryElementsAccessor
// Iterate through entire range, as accessing elements out of order is
// observable
for (uint32_t k = start_from; k < length; ++k) {
- int entry = dictionary->FindEntry(k);
+ int entry = dictionary->FindEntry(isolate, k);
if (entry == SeededNumberDictionary::kNotFound) {
if (search_for_hole) return Just(true);
continue;
@@ -1694,7 +1695,7 @@ class DictionaryElementsAccessor
// Iterate through entire range, as accessing elements out of order is
// observable.
for (uint32_t k = start_from; k < length; ++k) {
- int entry = dictionary->FindEntry(k);
+ int entry = dictionary->FindEntry(isolate, k);
if (entry == SeededNumberDictionary::kNotFound) {
continue;
}
« no previous file with comments | « src/deoptimizer.cc ('k') | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698