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

Side by Side Diff: src/objects.cc

Issue 671843003: Small fixes for the code serializer. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased and addressed nit Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/objects.h ('k') | src/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 <sstream> 5 #include <sstream>
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/accessors.h" 9 #include "src/accessors.h"
10 #include "src/allocation-site-scopes.h" 10 #include "src/allocation-site-scopes.h"
(...skipping 14751 matching lines...) Expand 10 before | Expand all | Expand 10 after
14762 if (entry == kNotFound) { 14762 if (entry == kNotFound) {
14763 return MaybeHandle<String>(); 14763 return MaybeHandle<String>();
14764 } else { 14764 } else {
14765 Handle<String> result(String::cast(string_table->KeyAt(entry)), isolate); 14765 Handle<String> result(String::cast(string_table->KeyAt(entry)), isolate);
14766 DCHECK(StringShape(*result).IsInternalized()); 14766 DCHECK(StringShape(*result).IsInternalized());
14767 return result; 14767 return result;
14768 } 14768 }
14769 } 14769 }
14770 14770
14771 14771
14772 void StringTable::EnsureCapacityForDeserialization(Isolate* isolate,
14773 int expected) {
14774 Handle<StringTable> table = isolate->factory()->string_table();
14775 // We need a key instance for the virtual hash function.
14776 InternalizedStringKey dummy_key(Handle<String>::null());
14777 table = StringTable::EnsureCapacity(table, expected, &dummy_key);
14778 isolate->factory()->set_string_table(table);
14779 }
14780
14781
14772 Handle<String> StringTable::LookupString(Isolate* isolate, 14782 Handle<String> StringTable::LookupString(Isolate* isolate,
14773 Handle<String> string) { 14783 Handle<String> string) {
14774 InternalizedStringKey key(string); 14784 InternalizedStringKey key(string);
14775 return LookupKey(isolate, &key); 14785 return LookupKey(isolate, &key);
14776 } 14786 }
14777 14787
14778 14788
14779 Handle<String> StringTable::LookupKey(Isolate* isolate, HashTableKey* key) { 14789 Handle<String> StringTable::LookupKey(Isolate* isolate, HashTableKey* key) {
14780 Handle<StringTable> table = isolate->factory()->string_table(); 14790 Handle<StringTable> table = isolate->factory()->string_table();
14781 int entry = table->FindEntry(key); 14791 int entry = table->FindEntry(key);
(...skipping 1669 matching lines...) Expand 10 before | Expand all | Expand 10 after
16451 Handle<DependentCode> codes = 16461 Handle<DependentCode> codes =
16452 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()), 16462 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()),
16453 DependentCode::kPropertyCellChangedGroup, 16463 DependentCode::kPropertyCellChangedGroup,
16454 info->object_wrapper()); 16464 info->object_wrapper());
16455 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); 16465 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes);
16456 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( 16466 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add(
16457 cell, info->zone()); 16467 cell, info->zone());
16458 } 16468 }
16459 16469
16460 } } // namespace v8::internal 16470 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/serialize.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698