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

Unified Diff: runtime/vm/object.cc

Issue 72923002: Add Dart keyword symbols to the VM isolate (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 30276)
+++ runtime/vm/object.cc (working copy)
@@ -6778,13 +6778,7 @@
Smi::Value(reinterpret_cast<RawSmi*>(obj.raw())));
ASSERT(kind < Token::kNumTokens);
if (Token::IsPseudoKeyword(kind) || Token::IsKeyword(kind)) {
- Isolate* isolate = Isolate::Current();
- ObjectStore* object_store = isolate->object_store();
- const Array& symbols = Array::Handle(isolate,
- object_store->keyword_symbols());
- ASSERT(!symbols.IsNull());
- ASSERT(symbols.At(kind - Token::kFirstKeyword) != Object::null());
- return String::RawCast(symbols.At(kind - Token::kFirstKeyword));
+ return Symbols::Keyword(kind).raw();
}
return Symbols::New(Token::Str(kind));
} else {
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/object_store.h » ('j') | runtime/vm/object_store.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698