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

Unified Diff: src/heap.cc

Issue 6525: Calculate string hash during flattening. (Closed)
Patch Set: Created 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap.h ('k') | src/objects.h » ('j') | src/objects.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index 4751165770da93689d0f9fe502d534bb91fde827..34201996b03357bd0c318ff29ccf6a6c44ae96c4 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -2251,6 +2251,16 @@ Object* Heap::LookupSymbol(String* string) {
}
+bool Heap::LookupSymbolIfExists(String* string, String** symbol) {
+ if (string->IsSymbol()) {
+ *symbol = string;
+ return true;
+ }
+ SymbolTable* table = SymbolTable::cast(symbol_table_);
+ return table->LookupSymbolIfExists(string, symbol);
+}
+
+
#ifdef DEBUG
void Heap::ZapFromSpace() {
ASSERT(HAS_HEAP_OBJECT_TAG(kFromSpaceZapValue));
« no previous file with comments | « src/heap.h ('k') | src/objects.h » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698