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

Unified Diff: vm/object_store.cc

Issue 9462003: Changes to shrink the token stream representation from two words to one word. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 10 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
« vm/object.h ('K') | « vm/object_store.h ('k') | vm/parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/object_store.cc
===================================================================
--- vm/object_store.cc (revision 4719)
+++ vm/object_store.cc (working copy)
@@ -54,6 +54,7 @@
empty_context_(Context::null()),
stack_overflow_(Instance::null()),
out_of_memory_(Instance::null()),
+ keyword_symbols_(Array::null()),
preallocate_objects_called_(false) {
}
@@ -104,6 +105,16 @@
}
+void ObjectStore::InitKeywordTable() {
+ // Set up the keywords symbol array so that we can access it while scanning.
+ Array& keywords = Array::Handle(keyword_symbols());
+ ASSERT(keywords.IsNull());
+ keywords = Array::New(Token::numKeywords, Heap::kOld);
+ ASSERT(!keywords.IsError() && !keywords.IsNull());
+ set_keyword_symbols(keywords);
+}
+
+
RawClass* ObjectStore::GetClass(int index) {
switch (index) {
case kObjectClass: return object_class_;
« vm/object.h ('K') | « vm/object_store.h ('k') | vm/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698