Chromium Code Reviews| Index: vm/symbols.cc |
| =================================================================== |
| --- vm/symbols.cc (revision 9873) |
| +++ vm/symbols.cc (working copy) |
| @@ -47,6 +47,17 @@ |
| } |
| +intptr_t Symbols::UsedCount(Isolate* isolate) { |
|
cshapiro
2012/07/25 02:57:20
Naming this method Size and renaming the variable
siva
2012/07/25 23:41:15
I called the method 'Size' as it is a count of ent
|
| + ASSERT(isolate != NULL); |
| + Array& symbol_table = Array::Handle(isolate, |
| + isolate->object_store()->symbol_table()); |
| + intptr_t table_size = symbol_table.Length() - 1; |
| + Smi& used = Smi::Handle(); |
| + used ^= symbol_table.At(table_size); |
| + return used.Value(); |
| +} |
| + |
| + |
| void Symbols::Add(const Array& symbol_table, const String& str) { |
| // Should only be run by the vm isolate. |
| ASSERT(Isolate::Current() == Dart::vm_isolate()); |