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

Side by Side Diff: runtime/vm/object.cc

Issue 17646002: Use call counts to determine which static calls to inline. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 8685 matching lines...) Expand 10 before | Expand all | Expand 10 after
8696 8696
8697 intptr_t ICData::GetCountAt(intptr_t index) const { 8697 intptr_t ICData::GetCountAt(intptr_t index) const {
8698 const Array& data = Array::Handle(ic_data()); 8698 const Array& data = Array::Handle(ic_data());
8699 const intptr_t data_pos = index * TestEntryLength() + 8699 const intptr_t data_pos = index * TestEntryLength() +
8700 CountIndexFor(num_args_tested()); 8700 CountIndexFor(num_args_tested());
8701 return Smi::Value(Smi::RawCast(data.At(data_pos))); 8701 return Smi::Value(Smi::RawCast(data.At(data_pos)));
8702 } 8702 }
8703 8703
8704 8704
8705 intptr_t ICData::AggregateCount() const { 8705 intptr_t ICData::AggregateCount() const {
8706 if (IsNull()) return 0;
8706 const intptr_t len = NumberOfChecks(); 8707 const intptr_t len = NumberOfChecks();
8707 intptr_t count = 0; 8708 intptr_t count = 0;
8708 for (intptr_t i = 0; i < len; i++) { 8709 for (intptr_t i = 0; i < len; i++) {
8709 count += GetCountAt(i); 8710 count += GetCountAt(i);
8710 } 8711 }
8711 return count; 8712 return count;
8712 } 8713 }
8713 8714
8714 8715
8715 RawFunction* ICData::GetTargetForReceiverClassId(intptr_t class_id) const { 8716 RawFunction* ICData::GetTargetForReceiverClassId(intptr_t class_id) const {
(...skipping 4948 matching lines...) Expand 10 before | Expand all | Expand 10 after
13664 space); 13665 space);
13665 return reinterpret_cast<RawWeakProperty*>(raw); 13666 return reinterpret_cast<RawWeakProperty*>(raw);
13666 } 13667 }
13667 13668
13668 13669
13669 const char* WeakProperty::ToCString() const { 13670 const char* WeakProperty::ToCString() const {
13670 return "_WeakProperty"; 13671 return "_WeakProperty";
13671 } 13672 }
13672 13673
13673 } // namespace dart 13674 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698