Index: src/heap.cc |
diff --git a/src/heap.cc b/src/heap.cc |
index cbb021cd154da807e10d1eff9b0779dfe3c32183..44229f09b3d32245cde92475a003168b17ca03e0 100644 |
--- a/src/heap.cc |
+++ b/src/heap.cc |
@@ -4013,6 +4013,36 @@ MaybeObject* Heap::LookupSymbol(Vector<const char> string) { |
} |
+MaybeObject* Heap::LookupAsciiSymbol(Vector<const char> string) { |
+ Object* symbol = NULL; |
+ Object* new_table; |
+ { MaybeObject* maybe_new_table = |
+ symbol_table()->LookupAsciiSymbol(string, &symbol); |
+ if (!maybe_new_table->ToObject(&new_table)) return maybe_new_table; |
+ } |
+ // Can't use set_symbol_table because SymbolTable::cast knows that |
+ // SymbolTable is a singleton and checks for identity. |
+ roots_[kSymbolTableRootIndex] = new_table; |
+ ASSERT(symbol != NULL); |
+ return symbol; |
+} |
+ |
+ |
+MaybeObject* Heap::LookupTwoByteSymbol(Vector<const uc16> string) { |
+ Object* symbol = NULL; |
+ Object* new_table; |
+ { MaybeObject* maybe_new_table = |
+ symbol_table()->LookupTwoByteSymbol(string, &symbol); |
+ if (!maybe_new_table->ToObject(&new_table)) return maybe_new_table; |
+ } |
+ // Can't use set_symbol_table because SymbolTable::cast knows that |
+ // SymbolTable is a singleton and checks for identity. |
+ roots_[kSymbolTableRootIndex] = new_table; |
+ ASSERT(symbol != NULL); |
+ return symbol; |
+} |
+ |
+ |
MaybeObject* Heap::LookupSymbol(String* string) { |
if (string->IsSymbol()) return string; |
Object* symbol = NULL; |