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

Unified Diff: runtime/vm/object.cc

Issue 1427863002: Token stream iterator improvement (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « runtime/vm/object.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 1dfdcdf3877d16c956c79c8dd6fd40d30e3f843b..6098fd97e6bc16564b4d669f142a8d49cfa06000 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -8568,7 +8568,8 @@ TokenStream::Iterator::Iterator(const TokenStream& tokens,
: tokens_(TokenStream::Handle(tokens.raw())),
data_(ExternalTypedData::Handle(tokens.GetStream())),
stream_(reinterpret_cast<uint8_t*>(data_.DataAddr(0)), data_.Length()),
- token_objects_(GrowableObjectArray::Handle(tokens.TokenObjects())),
+ token_objects_(Array::Handle(
+ GrowableObjectArray::Handle(tokens.TokenObjects()).data())),
obj_(Object::Handle()),
cur_token_pos_(token_pos),
cur_token_kind_(Token::kILLEGAL),
@@ -8584,7 +8585,7 @@ void TokenStream::Iterator::SetStream(const TokenStream& tokens,
data_ = tokens.GetStream();
stream_.SetStream(reinterpret_cast<uint8_t*>(data_.DataAddr(0)),
data_.Length());
- token_objects_ = tokens.TokenObjects();
+ token_objects_ = GrowableObjectArray::Handle(tokens.TokenObjects()).data();
obj_ = Object::null();
cur_token_pos_ = token_pos;
cur_token_kind_ = Token::kILLEGAL;
« no previous file with comments | « runtime/vm/object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698