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

Unified Diff: runtime/vm/intermediate_language_arm.cc

Issue 730343005: Write-barrier verification on ARM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/flow_graph_compiler_arm.cc ('k') | runtime/vm/intrinsifier_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_arm.cc
===================================================================
--- runtime/vm/intermediate_language_arm.cc (revision 42190)
+++ runtime/vm/intermediate_language_arm.cc (working copy)
@@ -2331,14 +2331,22 @@
// R3: new object end address.
// R8: iterator which initially points to the start of the variable
// data area to be initialized.
- // R6, R7: null
+ // R6: null
if (num_elements > 0) {
const intptr_t array_size = instance_size - sizeof(RawArray);
__ LoadImmediate(R6, reinterpret_cast<intptr_t>(Object::null()));
- __ mov(R7, Operand(R6));
+ if (num_elements >= 2) {
+ __ mov(R7, Operand(R6));
+ } else {
+#if defined(DEBUG)
+ // Clobber R7 with an invalid pointer.
+ __ LoadImmediate(R7, 0x1);
+#endif // DEBUG
+ }
__ AddImmediate(R8, R0, sizeof(RawArray) - kHeapObjectTag);
if (array_size < (kInlineArraySize * kWordSize)) {
- __ InitializeFieldsNoBarrierUnrolled(R0, R8, num_elements, R6, R7);
+ __ InitializeFieldsNoBarrierUnrolled(R0, R8, 0, num_elements * kWordSize,
+ R6, R7);
} else {
__ InitializeFieldsNoBarrier(R0, R8, R3, R6, R7);
}
« no previous file with comments | « runtime/vm/flow_graph_compiler_arm.cc ('k') | runtime/vm/intrinsifier_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698