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

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

Issue 12317011: Inline ByteArray._setIndexed in the flow graph optimizer. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: fixed assert with ICData::New Created 7 years, 10 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/intrinsifier_x64.cc ('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/bigint_operations.h" 10 #include "vm/bigint_operations.h"
(...skipping 8102 matching lines...) Expand 10 before | Expand all | Expand 10 after
8113 8113
8114 void ICData::AddReceiverCheck(intptr_t receiver_class_id, 8114 void ICData::AddReceiverCheck(intptr_t receiver_class_id,
8115 const Function& target) const { 8115 const Function& target) const {
8116 #if defined(DEBUG) 8116 #if defined(DEBUG)
8117 GrowableArray<intptr_t> class_ids(1); 8117 GrowableArray<intptr_t> class_ids(1);
8118 class_ids.Add(receiver_class_id); 8118 class_ids.Add(receiver_class_id);
8119 ASSERT(!HasCheck(class_ids)); 8119 ASSERT(!HasCheck(class_ids));
8120 #endif // DEBUG 8120 #endif // DEBUG
8121 ASSERT(num_args_tested() == 1); // Otherwise use 'AddCheck'. 8121 ASSERT(num_args_tested() == 1); // Otherwise use 'AddCheck'.
8122 ASSERT(receiver_class_id != kIllegalCid); 8122 ASSERT(receiver_class_id != kIllegalCid);
8123 ASSERT(!target.IsNull());
8124 8123
8125 const intptr_t old_num = NumberOfChecks(); 8124 const intptr_t old_num = NumberOfChecks();
8126 Array& data = Array::Handle(ic_data()); 8125 Array& data = Array::Handle(ic_data());
8127 const intptr_t new_len = data.Length() + TestEntryLength(); 8126 const intptr_t new_len = data.Length() + TestEntryLength();
8128 data = Array::Grow(data, new_len, Heap::kOld); 8127 data = Array::Grow(data, new_len, Heap::kOld);
8129 set_ic_data(data); 8128 set_ic_data(data);
8130 WriteSentinel(); 8129 WriteSentinel();
8131 intptr_t data_pos = old_num * TestEntryLength(); 8130 intptr_t data_pos = old_num * TestEntryLength();
8132 if ((receiver_class_id == kSmiCid) && (data_pos > 0)) { 8131 if ((receiver_class_id == kSmiCid) && (data_pos > 0)) {
8133 ASSERT(GetReceiverClassIdAt(0) != kSmiCid); 8132 ASSERT(GetReceiverClassIdAt(0) != kSmiCid);
(...skipping 4758 matching lines...) Expand 10 before | Expand all | Expand 10 after
12892 } 12891 }
12893 return result.raw(); 12892 return result.raw();
12894 } 12893 }
12895 12894
12896 12895
12897 const char* WeakProperty::ToCString() const { 12896 const char* WeakProperty::ToCString() const {
12898 return "_WeakProperty"; 12897 return "_WeakProperty";
12899 } 12898 }
12900 12899
12901 } // namespace dart 12900 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698