| OLD | NEW |
| 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_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
| 6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
| 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 914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 925 | 925 |
| 926 // Note that index is Smi, i.e, times 2. | 926 // Note that index is Smi, i.e, times 2. |
| 927 ASSERT(kSmiTagShift == 1); | 927 ASSERT(kSmiTagShift == 1); |
| 928 Location index = locs()->in(1); | 928 Location index = locs()->in(1); |
| 929 FieldAddress field_address = index.IsConstant() | 929 FieldAddress field_address = index.IsConstant() |
| 930 ? FieldAddress( | 930 ? FieldAddress( |
| 931 array, | 931 array, |
| 932 Smi::Cast(index.constant()).Value() * kWordSize + sizeof(RawArray)) | 932 Smi::Cast(index.constant()).Value() * kWordSize + sizeof(RawArray)) |
| 933 : FieldAddress(array, index.reg(), TIMES_2, sizeof(RawArray)); | 933 : FieldAddress(array, index.reg(), TIMES_2, sizeof(RawArray)); |
| 934 | 934 |
| 935 if (this->value()->NeedsStoreBuffer()) { | 935 if (this->value()->NeedsStoreBuffer() && emit_store_barrier()) { |
| 936 Register value = locs()->in(2).reg(); | 936 Register value = locs()->in(2).reg(); |
| 937 __ StoreIntoObject(array, field_address, value); | 937 __ StoreIntoObject(array, field_address, value); |
| 938 } else { | 938 } else { |
| 939 if (locs()->in(2).IsConstant()) { | 939 if (locs()->in(2).IsConstant()) { |
| 940 const Object& constant = locs()->in(2).constant(); | 940 const Object& constant = locs()->in(2).constant(); |
| 941 __ StoreIntoObjectNoBarrier(array, field_address, constant); | 941 __ StoreIntoObjectNoBarrier(array, field_address, constant); |
| 942 } else { | 942 } else { |
| 943 Register value = locs()->in(2).reg(); | 943 Register value = locs()->in(2).reg(); |
| 944 __ StoreIntoObjectNoBarrier(array, field_address, value); | 944 __ StoreIntoObjectNoBarrier(array, field_address, value); |
| 945 } | 945 } |
| (...skipping 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2279 __ j(ABOVE_EQUAL, deopt); | 2279 __ j(ABOVE_EQUAL, deopt); |
| 2280 } | 2280 } |
| 2281 } | 2281 } |
| 2282 | 2282 |
| 2283 | 2283 |
| 2284 } // namespace dart | 2284 } // namespace dart |
| 2285 | 2285 |
| 2286 #undef __ | 2286 #undef __ |
| 2287 | 2287 |
| 2288 #endif // defined TARGET_ARCH_X64 | 2288 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |