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

Unified Diff: runtime/vm/assembler_ia32_test.cc

Issue 10636017: - Fix the x64 store-barrier. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/assembler_ia32.cc ('k') | runtime/vm/assembler_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_ia32_test.cc
===================================================================
--- runtime/vm/assembler_ia32_test.cc (revision 9049)
+++ runtime/vm/assembler_ia32_test.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -1837,6 +1837,7 @@
}
+// Called from assembler_test.cc.
ASSEMBLER_TEST_GENERATE(StoreIntoObject, assembler) {
__ pushl(CTX);
__ movl(CTX, Address(ESP, 2 * kWordSize));
@@ -1850,70 +1851,6 @@
}
-ASSEMBLER_TEST_RUN(StoreIntoObject, entry) {
- typedef void (*StoreData)(RawContext* ctx,
- RawObject* value,
- RawObject* growable_array);
- StoreData test_code = reinterpret_cast<StoreData>(entry);
-
- const Array& old_array = Array::Handle(Array::New(3, Heap::kOld));
- const Array& new_array = Array::Handle(Array::New(3, Heap::kNew));
- const GrowableObjectArray& grow_old_array = GrowableObjectArray::Handle(
- GrowableObjectArray::New(old_array, Heap::kOld));
- const GrowableObjectArray& grow_new_array = GrowableObjectArray::Handle(
- GrowableObjectArray::New(old_array, Heap::kNew));
- Smi& smi = Smi::Handle();
- const Context& ctx = Context::Handle(Context::New(0));
-
- EXPECT(old_array.raw() == grow_old_array.data());
- EXPECT(!Isolate::Current()->store_buffer()->Contains(
- reinterpret_cast<uword>(grow_old_array.raw()) +
- GrowableObjectArray::data_offset() - kHeapObjectTag));
- EXPECT(old_array.raw() == grow_new_array.data());
- EXPECT(!Isolate::Current()->store_buffer()->Contains(
- reinterpret_cast<uword>(grow_new_array.raw()) +
- GrowableObjectArray::data_offset() - kHeapObjectTag));
-
- // Store Smis into the old object.
- for (int i = -32; i < 32; i++) {
- smi = Smi::New(i);
- test_code(ctx.raw(), smi.raw(), grow_old_array.raw());
- EXPECT(reinterpret_cast<RawArray*>(smi.raw()) == grow_old_array.data());
- EXPECT(!Isolate::Current()->store_buffer()->Contains(
- reinterpret_cast<uword>(grow_old_array.raw()) +
- GrowableObjectArray::data_offset() - kHeapObjectTag));
- }
-
- // Store an old object into the old object.
- test_code(ctx.raw(), old_array.raw(), grow_old_array.raw());
- EXPECT(old_array.raw() == grow_old_array.data());
- EXPECT(!Isolate::Current()->store_buffer()->Contains(
- reinterpret_cast<uword>(grow_old_array.raw()) +
- GrowableObjectArray::data_offset() - kHeapObjectTag));
-
- // Store a new object into the old object.
- test_code(ctx.raw(), new_array.raw(), grow_old_array.raw());
- EXPECT(new_array.raw() == grow_old_array.data());
- EXPECT(Isolate::Current()->store_buffer()->Contains(
- reinterpret_cast<uword>(grow_old_array.raw()) +
- GrowableObjectArray::data_offset() - kHeapObjectTag));
-
- // Store a new object into the new object.
- test_code(ctx.raw(), new_array.raw(), grow_new_array.raw());
- EXPECT(new_array.raw() == grow_new_array.data());
- EXPECT(!Isolate::Current()->store_buffer()->Contains(
- reinterpret_cast<uword>(grow_new_array.raw()) +
- GrowableObjectArray::data_offset() - kHeapObjectTag));
-
- // Store an old object into the new object.
- test_code(ctx.raw(), old_array.raw(), grow_new_array.raw());
- EXPECT(old_array.raw() == grow_new_array.data());
- EXPECT(!Isolate::Current()->store_buffer()->Contains(
- reinterpret_cast<uword>(grow_new_array.raw()) +
- GrowableObjectArray::data_offset() - kHeapObjectTag));
-}
-
-
} // namespace dart
#endif // defined TARGET_ARCH_IA32
« no previous file with comments | « runtime/vm/assembler_ia32.cc ('k') | runtime/vm/assembler_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698