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

Unified Diff: runtime/vm/object.cc

Issue 666993002: Fix test timeout; faster DEBUG String::CharAt by not using mutable accessor. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 41200)
+++ runtime/vm/object.cc (working copy)
@@ -17040,18 +17040,17 @@
uint16_t String::CharAt(intptr_t index) const {
intptr_t class_id = raw()->GetClassId();
ASSERT(RawObject::IsStringClassId(class_id));
- NoGCScope no_gc;
if (class_id == kOneByteStringCid) {
- return *OneByteString::CharAddr(*this, index);
+ return OneByteString::CharAt(*this, index);
}
if (class_id == kTwoByteStringCid) {
- return *TwoByteString::CharAddr(*this, index);
+ return TwoByteString::CharAt(*this, index);
}
if (class_id == kExternalOneByteStringCid) {
- return *ExternalOneByteString::CharAddr(*this, index);
+ return ExternalOneByteString::CharAt(*this, index);
}
ASSERT(class_id == kExternalTwoByteStringCid);
- return *ExternalTwoByteString::CharAddr(*this, index);
+ return ExternalTwoByteString::CharAt(*this, index);
}
« runtime/vm/object.h ('K') | « runtime/vm/object.h ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698