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

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

Issue 2716593002: Propagate this-specialization to regular (megamorphic) calls (Closed)
Patch Set: Add new Canonicalize call to make use of type data Created 3 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/object.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/become.h" 10 #include "vm/become.h"
(...skipping 13508 matching lines...) Expand 10 before | Expand all | Expand 10 after
13519 13519
13520 void ICData::SetEntryPointAt(intptr_t index, const Smi& value) const { 13520 void ICData::SetEntryPointAt(intptr_t index, const Smi& value) const {
13521 ASSERT(!Isolate::Current()->compilation_allowed()); 13521 ASSERT(!Isolate::Current()->compilation_allowed());
13522 const Array& data = Array::Handle(ic_data()); 13522 const Array& data = Array::Handle(ic_data());
13523 const intptr_t data_pos = 13523 const intptr_t data_pos =
13524 index * TestEntryLength() + EntryPointIndexFor(NumArgsTested()); 13524 index * TestEntryLength() + EntryPointIndexFor(NumArgsTested());
13525 data.SetAt(data_pos, value); 13525 data.SetAt(data_pos, value);
13526 } 13526 }
13527 13527
13528 13528
13529 RawFunction* ICData::GetTargetForReceiverClassId(intptr_t class_id) const { 13529 RawFunction* ICData::GetTargetForReceiverClassId(intptr_t class_id,
13530 intptr_t* count_return) const {
13530 const intptr_t len = NumberOfChecks(); 13531 const intptr_t len = NumberOfChecks();
13531 for (intptr_t i = 0; i < len; i++) { 13532 for (intptr_t i = 0; i < len; i++) {
13532 if (GetReceiverClassIdAt(i) == class_id) { 13533 if (GetReceiverClassIdAt(i) == class_id) {
13534 *count_return = GetCountAt(i);
13533 return GetTargetAt(i); 13535 return GetTargetAt(i);
13534 } 13536 }
13535 } 13537 }
13536 return Function::null(); 13538 return Function::null();
13537 } 13539 }
13538 13540
13539 13541
13540 RawICData* ICData::AsUnaryClassChecksForCid(intptr_t cid, 13542 RawICData* ICData::AsUnaryClassChecksForCid(intptr_t cid,
13541 const Function& target) const { 13543 const Function& target) const {
13542 ASSERT(!IsNull()); 13544 ASSERT(!IsNull());
(...skipping 9363 matching lines...) Expand 10 before | Expand all | Expand 10 after
22906 return UserTag::null(); 22908 return UserTag::null();
22907 } 22909 }
22908 22910
22909 22911
22910 const char* UserTag::ToCString() const { 22912 const char* UserTag::ToCString() const {
22911 const String& tag_label = String::Handle(label()); 22913 const String& tag_label = String::Handle(label());
22912 return tag_label.ToCString(); 22914 return tag_label.ToCString();
22913 } 22915 }
22914 22916
22915 } // namespace dart 22917 } // namespace dart
OLDNEW
« 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