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

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

Issue 2481873005: clang-format runtime/vm (Closed)
Patch Set: Merge Created 4 years, 1 month 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
« no previous file with comments | « runtime/vm/assembler_mips_test.cc ('k') | runtime/vm/assembler_x64.h » ('j') | 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) 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/assembler.h" 5 #include "vm/assembler.h"
6 #include "vm/globals.h" 6 #include "vm/globals.h"
7 #include "vm/os.h" 7 #include "vm/os.h"
8 #include "vm/simulator.h" 8 #include "vm/simulator.h"
9 #include "vm/unit_test.h" 9 #include "vm/unit_test.h"
10 #include "vm/virtual_memory.h" 10 #include "vm/virtual_memory.h"
11 11
12 namespace dart { 12 namespace dart {
13 13
14 ASSEMBLER_TEST_EXTERN(StoreIntoObject); 14 ASSEMBLER_TEST_EXTERN(StoreIntoObject);
15 15
16 ASSEMBLER_TEST_RUN(StoreIntoObject, test) { 16 ASSEMBLER_TEST_RUN(StoreIntoObject, test) {
17 #define TEST_CODE(value, growable_array, thread) \ 17 #define TEST_CODE(value, growable_array, thread) \
18 test->Invoke<void, RawObject*, RawObject*, Thread*>( \ 18 test->Invoke<void, RawObject*, RawObject*, Thread*>(value, growable_array, \
19 value, growable_array, thread) 19 thread)
20 20
21 const Array& old_array = Array::Handle(Array::New(3, Heap::kOld)); 21 const Array& old_array = Array::Handle(Array::New(3, Heap::kOld));
22 const Array& new_array = Array::Handle(Array::New(3, Heap::kNew)); 22 const Array& new_array = Array::Handle(Array::New(3, Heap::kNew));
23 const GrowableObjectArray& grow_old_array = GrowableObjectArray::Handle( 23 const GrowableObjectArray& grow_old_array = GrowableObjectArray::Handle(
24 GrowableObjectArray::New(old_array, Heap::kOld)); 24 GrowableObjectArray::New(old_array, Heap::kOld));
25 const GrowableObjectArray& grow_new_array = GrowableObjectArray::Handle( 25 const GrowableObjectArray& grow_new_array = GrowableObjectArray::Handle(
26 GrowableObjectArray::New(old_array, Heap::kNew)); 26 GrowableObjectArray::New(old_array, Heap::kNew));
27 Smi& smi = Smi::Handle(); 27 Smi& smi = Smi::Handle();
28 Thread* thread = Thread::Current(); 28 Thread* thread = Thread::Current();
29 29
(...skipping 25 matching lines...) Expand all
55 EXPECT(new_array.raw() == grow_new_array.data()); 55 EXPECT(new_array.raw() == grow_new_array.data());
56 EXPECT(!thread->StoreBufferContains(grow_new_array.raw())); 56 EXPECT(!thread->StoreBufferContains(grow_new_array.raw()));
57 57
58 // Store an old object into the new object. 58 // Store an old object into the new object.
59 TEST_CODE(old_array.raw(), grow_new_array.raw(), thread); 59 TEST_CODE(old_array.raw(), grow_new_array.raw(), thread);
60 EXPECT(old_array.raw() == grow_new_array.data()); 60 EXPECT(old_array.raw() == grow_new_array.data());
61 EXPECT(!thread->StoreBufferContains(grow_new_array.raw())); 61 EXPECT(!thread->StoreBufferContains(grow_new_array.raw()));
62 } 62 }
63 63
64 } // namespace dart 64 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/assembler_mips_test.cc ('k') | runtime/vm/assembler_x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698