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

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

Issue 13925024: Implements write barrier on MIPS. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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
« no previous file with comments | « runtime/vm/assembler_mips_test.cc ('k') | runtime/vm/constants_mips.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 #if defined(TARGET_ARCH_IA32) || \
15 defined(TARGET_ARCH_X64) || \
16 defined(TARGET_ARCH_ARM)
17
18 ASSEMBLER_TEST_EXTERN(StoreIntoObject); 14 ASSEMBLER_TEST_EXTERN(StoreIntoObject);
19 15
20 ASSEMBLER_TEST_RUN(StoreIntoObject, test) { 16 ASSEMBLER_TEST_RUN(StoreIntoObject, test) {
21 #if defined(USING_SIMULATOR) 17 #if defined(USING_SIMULATOR)
22 #define test_code(ctx, value, growable_array) \ 18 #define test_code(ctx, value, growable_array) \
23 Simulator::Current()->Call( \ 19 Simulator::Current()->Call( \
24 bit_cast<int32_t, uword>(test->entry()), \ 20 bit_cast<int32_t, uword>(test->entry()), \
25 reinterpret_cast<int32_t>(ctx), \ 21 reinterpret_cast<int32_t>(ctx), \
26 reinterpret_cast<int32_t>(value), \ 22 reinterpret_cast<int32_t>(value), \
27 reinterpret_cast<int32_t>(growable_array), \ 23 reinterpret_cast<int32_t>(growable_array), \
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 EXPECT(!Isolate::Current()->store_buffer_block()->Contains( 72 EXPECT(!Isolate::Current()->store_buffer_block()->Contains(
77 reinterpret_cast<uword>(grow_new_array.raw()))); 73 reinterpret_cast<uword>(grow_new_array.raw())));
78 74
79 // Store an old object into the new object. 75 // Store an old object into the new object.
80 test_code(ctx.raw(), old_array.raw(), grow_new_array.raw()); 76 test_code(ctx.raw(), old_array.raw(), grow_new_array.raw());
81 EXPECT(old_array.raw() == grow_new_array.data()); 77 EXPECT(old_array.raw() == grow_new_array.data());
82 EXPECT(!Isolate::Current()->store_buffer_block()->Contains( 78 EXPECT(!Isolate::Current()->store_buffer_block()->Contains(
83 reinterpret_cast<uword>(grow_new_array.raw()))); 79 reinterpret_cast<uword>(grow_new_array.raw())));
84 } 80 }
85 81
86 #endif // TARGET_ARCH_IA32 || TARGET_ARCH_X64 || TARGET_ARCH_ARM
87
88 } // namespace dart 82 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/assembler_mips_test.cc ('k') | runtime/vm/constants_mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698