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

Side by Side Diff: test/cctest/test-heap.cc

Issue 6250076: Start using store buffers. Handle store buffer overflow situation.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 10 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
« src/store-buffer.h ('K') | « src/v8globals.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 2
3 #include <stdlib.h> 3 #include <stdlib.h>
4 4
5 #include "v8.h" 5 #include "v8.h"
6 6
7 #include "execution.h" 7 #include "execution.h"
8 #include "factory.h" 8 #include "factory.h"
9 #include "macro-assembler.h" 9 #include "macro-assembler.h"
10 #include "global-handles.h" 10 #include "global-handles.h"
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after
904 // in old pointer space. 904 // in old pointer space.
905 Address old_pointer_space_top = Heap::old_pointer_space()->top(); 905 Address old_pointer_space_top = Heap::old_pointer_space()->top();
906 AlwaysAllocateScope aa_scope; 906 AlwaysAllocateScope aa_scope;
907 Object* clone_obj = Heap::CopyJSObject(jsobject)->ToObjectChecked(); 907 Object* clone_obj = Heap::CopyJSObject(jsobject)->ToObjectChecked();
908 JSObject* clone = JSObject::cast(clone_obj); 908 JSObject* clone = JSObject::cast(clone_obj);
909 if (clone->address() != old_pointer_space_top) { 909 if (clone->address() != old_pointer_space_top) {
910 // Alas, got allocated from free list, we cannot do checks. 910 // Alas, got allocated from free list, we cannot do checks.
911 return; 911 return;
912 } 912 }
913 CHECK(Heap::old_pointer_space()->Contains(clone->address())); 913 CHECK(Heap::old_pointer_space()->Contains(clone->address()));
914
915 // Step 5: verify validity of region dirty marks.
916 Address clone_addr = clone->address();
917 Page* page = Page::FromAddress(clone_addr);
918 // Check that region covering inobject property 1 is marked dirty.
919 CHECK(page->IsRegionDirty(clone_addr + (object_size - kPointerSize)));
920 } 914 }
921 915
922 916
923 TEST(TestCodeFlushing) { 917 TEST(TestCodeFlushing) {
924 i::FLAG_allow_natives_syntax = true; 918 i::FLAG_allow_natives_syntax = true;
925 // If we do not flush code this test is invalid. 919 // If we do not flush code this test is invalid.
926 if (!FLAG_flush_code) return; 920 if (!FLAG_flush_code) return;
927 InitializeVM(); 921 InitializeVM();
928 v8::HandleScope scope; 922 v8::HandleScope scope;
929 const char* source = "function foo() {" 923 const char* source = "function foo() {"
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
1252 CHECK(helper.b_found()); 1246 CHECK(helper.b_found());
1253 } 1247 }
1254 // ...but is now unreachable. 1248 // ...but is now unreachable.
1255 { 1249 {
1256 HeapIteratorTestHelper helper(a_saved, *b); 1250 HeapIteratorTestHelper helper(a_saved, *b);
1257 helper.IterateHeap(HeapIterator::kFilterUnreachable); 1251 helper.IterateHeap(HeapIterator::kFilterUnreachable);
1258 CHECK(!helper.a_found()); 1252 CHECK(!helper.a_found());
1259 CHECK(helper.b_found()); 1253 CHECK(helper.b_found());
1260 } 1254 }
1261 } 1255 }
OLDNEW
« src/store-buffer.h ('K') | « src/v8globals.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698