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

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

Issue 10910224: Using type feedback, eliminate store barriers for indexed stores. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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
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/globals.h" // Needed here to get TARGET_ARCH_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after
944 // Note that index is Smi, i.e, times 4. 944 // Note that index is Smi, i.e, times 4.
945 ASSERT(kSmiTagShift == 1); 945 ASSERT(kSmiTagShift == 1);
946 Location index = locs()->in(1); 946 Location index = locs()->in(1);
947 FieldAddress field_address = index.IsConstant() 947 FieldAddress field_address = index.IsConstant()
948 ? FieldAddress( 948 ? FieldAddress(
949 array, 949 array,
950 static_cast<int32_t>( 950 static_cast<int32_t>(
951 Smi::Cast(index.constant()).Value() * kWordSize + sizeof(RawArray))) 951 Smi::Cast(index.constant()).Value() * kWordSize + sizeof(RawArray)))
952 : FieldAddress(array, index.reg(), TIMES_4, sizeof(RawArray)); 952 : FieldAddress(array, index.reg(), TIMES_4, sizeof(RawArray));
953 953
954 if (this->value()->NeedsStoreBuffer()) { 954 if (this->value()->NeedsStoreBuffer() && emit_store_barrier()) {
955 Register value = locs()->in(2).reg(); 955 Register value = locs()->in(2).reg();
956 __ StoreIntoObject(array, field_address, value); 956 __ StoreIntoObject(array, field_address, value);
957 } else { 957 } else {
958 if (locs()->in(2).IsConstant()) { 958 if (locs()->in(2).IsConstant()) {
959 const Object& constant = locs()->in(2).constant(); 959 const Object& constant = locs()->in(2).constant();
960 __ StoreObject(field_address, constant); 960 __ StoreObject(field_address, constant);
961 } else { 961 } else {
962 Register value = locs()->in(2).reg(); 962 Register value = locs()->in(2).reg();
963 __ StoreIntoObjectNoBarrier(array, field_address, value); 963 __ StoreIntoObjectNoBarrier(array, field_address, value);
964 } 964 }
(...skipping 1340 matching lines...) Expand 10 before | Expand all | Expand 10 after
2305 __ j(ABOVE_EQUAL, deopt); 2305 __ j(ABOVE_EQUAL, deopt);
2306 } 2306 }
2307 } 2307 }
2308 2308
2309 2309
2310 } // namespace dart 2310 } // namespace dart
2311 2311
2312 #undef __ 2312 #undef __
2313 2313
2314 #endif // defined TARGET_ARCH_X64 2314 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698