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

Side by Side Diff: src/objects.cc

Issue 1204863006: Serializer: commit new internalized strings after deserialization. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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 unified diff | Download patch
« no previous file with comments | « src/objects.h ('k') | src/snapshot/serialize.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <iomanip> 5 #include <iomanip>
6 #include <sstream> 6 #include <sstream>
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/accessors.h" 10 #include "src/accessors.h"
(...skipping 14592 matching lines...) Expand 10 before | Expand all | Expand 10 after
14603 // Add the new string and return it along with the string table. 14603 // Add the new string and return it along with the string table.
14604 entry = table->FindInsertionEntry(key->Hash()); 14604 entry = table->FindInsertionEntry(key->Hash());
14605 table->set(EntryToIndex(entry), *string); 14605 table->set(EntryToIndex(entry), *string);
14606 table->ElementAdded(); 14606 table->ElementAdded();
14607 14607
14608 isolate->factory()->set_string_table(table); 14608 isolate->factory()->set_string_table(table);
14609 return Handle<String>::cast(string); 14609 return Handle<String>::cast(string);
14610 } 14610 }
14611 14611
14612 14612
14613 String* StringTable::LookupKeyIfExists(Isolate* isolate, HashTableKey* key) {
14614 Handle<StringTable> table = isolate->factory()->string_table();
14615 int entry = table->FindEntry(key);
14616 if (entry != kNotFound) return String::cast(table->KeyAt(entry));
14617 return NULL;
14618 }
14619
14620
14613 Handle<Object> CompilationCacheTable::Lookup(Handle<String> src, 14621 Handle<Object> CompilationCacheTable::Lookup(Handle<String> src,
14614 Handle<Context> context, 14622 Handle<Context> context,
14615 LanguageMode language_mode) { 14623 LanguageMode language_mode) {
14616 Isolate* isolate = GetIsolate(); 14624 Isolate* isolate = GetIsolate();
14617 Handle<SharedFunctionInfo> shared(context->closure()->shared()); 14625 Handle<SharedFunctionInfo> shared(context->closure()->shared());
14618 StringSharedKey key(src, shared, language_mode, RelocInfo::kNoPosition); 14626 StringSharedKey key(src, shared, language_mode, RelocInfo::kNoPosition);
14619 int entry = FindEntry(&key); 14627 int entry = FindEntry(&key);
14620 if (entry == kNotFound) return isolate->factory()->undefined_value(); 14628 if (entry == kNotFound) return isolate->factory()->undefined_value();
14621 int index = EntryToIndex(entry); 14629 int index = EntryToIndex(entry);
14622 if (!get(index)->IsFixedArray()) return isolate->factory()->undefined_value(); 14630 if (!get(index)->IsFixedArray()) return isolate->factory()->undefined_value();
(...skipping 1612 matching lines...) Expand 10 before | Expand all | Expand 10 after
16235 Handle<Object> new_value) { 16243 Handle<Object> new_value) {
16236 if (cell->value() != *new_value) { 16244 if (cell->value() != *new_value) {
16237 cell->set_value(*new_value); 16245 cell->set_value(*new_value);
16238 Isolate* isolate = cell->GetIsolate(); 16246 Isolate* isolate = cell->GetIsolate();
16239 cell->dependent_code()->DeoptimizeDependentCodeGroup( 16247 cell->dependent_code()->DeoptimizeDependentCodeGroup(
16240 isolate, DependentCode::kPropertyCellChangedGroup); 16248 isolate, DependentCode::kPropertyCellChangedGroup);
16241 } 16249 }
16242 } 16250 }
16243 } // namespace internal 16251 } // namespace internal
16244 } // namespace v8 16252 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/snapshot/serialize.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698