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

Unified Diff: runtime/vm/object.cc

Issue 183973035: More performance fixes. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 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 | « no previous file | runtime/vm/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 33386)
+++ runtime/vm/object.cc (working copy)
@@ -10964,10 +10964,12 @@
RawFunction* ICData::GetTargetAt(intptr_t index) const {
- const Array& data = Array::Handle(ic_data());
const intptr_t data_pos = index * TestEntryLength() + num_args_tested();
- ASSERT(Object::Handle(data.At(data_pos)).IsFunction());
- return reinterpret_cast<RawFunction*>(data.At(data_pos));
+ ASSERT(Object::Handle(Array::Handle(ic_data()).At(data_pos)).IsFunction());
+
+ NoGCScope no_gc;
+ RawArray* raw_data = ic_data();
+ return reinterpret_cast<RawFunction*>(raw_data->ptr()->data()[data_pos]);
}
@@ -11305,8 +11307,9 @@
intptr_t SubtypeTestCache::NumberOfChecks() const {
+ NoGCScope no_gc;
// Do not count the sentinel;
- return (Array::Handle(cache()).Length() / kTestEntryLength) - 1;
+ return (Smi::Value(cache()->ptr()->length_) / kTestEntryLength) - 1;
}
« no previous file with comments | « no previous file | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698