Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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" | 5 #include "vm/globals.h" |
| 6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
| 7 | 7 |
| 8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
| 9 #include "vm/code_generator.h" | 9 #include "vm/code_generator.h" |
| 10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 510 __ AddImmediate(R1, R0, Array::data_offset() - kHeapObjectTag); | 510 __ AddImmediate(R1, R0, Array::data_offset() - kHeapObjectTag); |
| 511 // R1: iterator which initially points to the start of the variable | 511 // R1: iterator which initially points to the start of the variable |
| 512 // data area to be initialized. | 512 // data area to be initialized. |
| 513 __ LoadImmediate(IP, reinterpret_cast<intptr_t>(Object::null())); | 513 __ LoadImmediate(IP, reinterpret_cast<intptr_t>(Object::null())); |
| 514 Label loop; | 514 Label loop; |
| 515 __ Bind(&loop); | 515 __ Bind(&loop); |
| 516 // TODO(cshapiro): StoreIntoObjectNoBarrier | 516 // TODO(cshapiro): StoreIntoObjectNoBarrier |
| 517 __ cmp(R1, ShifterOperand(R7)); | 517 __ cmp(R1, ShifterOperand(R7)); |
| 518 __ str(IP, Address(R1, 0), CC); // Store if unsigned lower. | 518 __ str(IP, Address(R1, 0), CC); // Store if unsigned lower. |
| 519 __ AddImmediate(R1, kWordSize, CC); | 519 __ AddImmediate(R1, kWordSize, CC); |
| 520 __ b(&loop, CS); | 520 __ b(&loop, CC); // Loop until R1 == R7. |
|
regis
2013/05/01 01:21:46
Thanks!
| |
| 521 | 521 |
| 522 // Done allocating and initializing the array. | 522 // Done allocating and initializing the array. |
| 523 // R0: new object. | 523 // R0: new object. |
| 524 // R2: array length as Smi (preserved for the caller.) | 524 // R2: array length as Smi (preserved for the caller.) |
| 525 __ Ret(); | 525 __ Ret(); |
| 526 } | 526 } |
| 527 | 527 |
| 528 // Unable to allocate the array using the fast inline code, just call | 528 // Unable to allocate the array using the fast inline code, just call |
| 529 // into the runtime. | 529 // into the runtime. |
| 530 __ Bind(&slow_case); | 530 __ Bind(&slow_case); |
| (...skipping 1372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1903 __ Bind(&reference_compare); | 1903 __ Bind(&reference_compare); |
| 1904 __ cmp(left, ShifterOperand(right)); | 1904 __ cmp(left, ShifterOperand(right)); |
| 1905 __ Bind(&done); | 1905 __ Bind(&done); |
| 1906 __ PopList((1 << R0) | (1 << R1) | (1 << R2)); | 1906 __ PopList((1 << R0) | (1 << R1) | (1 << R2)); |
| 1907 __ Ret(); | 1907 __ Ret(); |
| 1908 } | 1908 } |
| 1909 | 1909 |
| 1910 } // namespace dart | 1910 } // namespace dart |
| 1911 | 1911 |
| 1912 #endif // defined TARGET_ARCH_ARM | 1912 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |