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

Unified Diff: runtime/vm/symbols.cc

Issue 11308032: - Make sure to add predefined symbols into the current symbol table after growth. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/symbols.cc
===================================================================
--- runtime/vm/symbols.cc (revision 14942)
+++ runtime/vm/symbols.cc (working copy)
@@ -16,8 +16,6 @@
RawString* Symbols::predefined_[Symbols::kMaxId];
-// Turn off population of symbols in the VM symbol table, so that we
-// don't find these symbols while doing a Symbols::New(...).
static const char* names[] = {
NULL,
@@ -41,15 +39,16 @@
// Create and setup a symbol table in the vm isolate.
SetupSymbolTable(isolate);
- // Turn off population of symbols in the VM symbol table, so that we
- // don't find these symbols while doing a Symbols::New(...).
// Create all predefined symbols.
ASSERT((sizeof(names) / sizeof(const char*)) == Symbols::kMaxId);
- const Array& symbol_table =
- Array::Handle(isolate->object_store()->symbol_table());
+ ObjectStore* object_store = isolate->object_store();
+ Array& symbol_table = Array::Handle();
dart::String& str = String::Handle();
for (intptr_t i = 1; i < Symbols::kMaxId; i++) {
+ // The symbol_table needs to be reloaded as it might have grown in the
+ // previous iteration.
+ symbol_table = object_store->symbol_table();
str = OneByteString::New(names[i], Heap::kOld);
Add(symbol_table, str);
predefined_[i] = str.raw();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698