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

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

Issue 5798002: Provide baseline for new GC infrastructure. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 10 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 unified diff | Download patch | Annotate | Revision Log
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 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 Address clone_addr = clone->address(); 959 Address clone_addr = clone->address();
960 Page* page = Page::FromAddress(clone_addr); 960 Page* page = Page::FromAddress(clone_addr);
961 // Check that region covering inobject property 1 is marked dirty. 961 // Check that region covering inobject property 1 is marked dirty.
962 CHECK(page->IsRegionDirty(clone_addr + (object_size - kPointerSize))); 962 CHECK(page->IsRegionDirty(clone_addr + (object_size - kPointerSize)));
963 } 963 }
964 964
965 965
966 TEST(TestCodeFlushing) { 966 TEST(TestCodeFlushing) {
967 i::FLAG_allow_natives_syntax = true; 967 i::FLAG_allow_natives_syntax = true;
968 // If we do not flush code this test is invalid. 968 // If we do not flush code this test is invalid.
969 if (!FLAG_flush_code) return; 969 if (!FLAG_flush_code || FLAG_new_gc) return;
970 InitializeVM(); 970 InitializeVM();
971 v8::HandleScope scope; 971 v8::HandleScope scope;
972 const char* source = "function foo() {" 972 const char* source = "function foo() {"
973 " var x = 42;" 973 " var x = 42;"
974 " var y = 42;" 974 " var y = 42;"
975 " var z = x + y;" 975 " var z = x + y;"
976 "};" 976 "};"
977 "foo()"; 977 "foo()";
978 Handle<String> foo_name = Factory::LookupAsciiSymbol("foo"); 978 Handle<String> foo_name = Factory::LookupAsciiSymbol("foo");
979 979
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
1233 CHECK_GT(size_of_objects_1 / 100, delta); 1233 CHECK_GT(size_of_objects_1 / 100, delta);
1234 } else { 1234 } else {
1235 intptr_t delta = size_of_objects_2 - size_of_objects_1; 1235 intptr_t delta = size_of_objects_2 - size_of_objects_1;
1236 PrintF("Heap::SizeOfObjects: %" V8_PTR_PREFIX "d, " 1236 PrintF("Heap::SizeOfObjects: %" V8_PTR_PREFIX "d, "
1237 "Iterator: %" V8_PTR_PREFIX "d, " 1237 "Iterator: %" V8_PTR_PREFIX "d, "
1238 "delta: %" V8_PTR_PREFIX "d\n", 1238 "delta: %" V8_PTR_PREFIX "d\n",
1239 size_of_objects_1, size_of_objects_2, delta); 1239 size_of_objects_1, size_of_objects_2, delta);
1240 CHECK_GT(size_of_objects_2 / 100, delta); 1240 CHECK_GT(size_of_objects_2 / 100, delta);
1241 } 1241 }
1242 } 1242 }
OLDNEW
« src/mark-compact.cc ('K') | « src/spaces-inl.h ('k') | test/cctest/test-mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698