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

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

Issue 9535013: Merge r10809 from the bleeding_edge to the 3.8 branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.8/
Patch Set: Created 8 years, 9 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 | « test/cctest/test-alloc.cc ('k') | test/cctest/test-mark-compact.cc » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 objs[next_objs_index++] = FACTORY->NewJSArray(10); 813 objs[next_objs_index++] = FACTORY->NewJSArray(10);
814 objs[next_objs_index++] = FACTORY->NewJSArray(10, TENURED); 814 objs[next_objs_index++] = FACTORY->NewJSArray(10, TENURED);
815 815
816 // Allocate a small string to OLD_DATA_SPACE and NEW_SPACE 816 // Allocate a small string to OLD_DATA_SPACE and NEW_SPACE
817 objs[next_objs_index++] = 817 objs[next_objs_index++] =
818 FACTORY->NewStringFromAscii(CStrVector("abcdefghij")); 818 FACTORY->NewStringFromAscii(CStrVector("abcdefghij"));
819 objs[next_objs_index++] = 819 objs[next_objs_index++] =
820 FACTORY->NewStringFromAscii(CStrVector("abcdefghij"), TENURED); 820 FACTORY->NewStringFromAscii(CStrVector("abcdefghij"), TENURED);
821 821
822 // Allocate a large string (for large object space). 822 // Allocate a large string (for large object space).
823 int large_size = HEAP->MaxObjectSizeInPagedSpace() + 1; 823 int large_size = Page::kMaxNonCodeHeapObjectSize + 1;
824 char* str = new char[large_size]; 824 char* str = new char[large_size];
825 for (int i = 0; i < large_size - 1; ++i) str[i] = 'a'; 825 for (int i = 0; i < large_size - 1; ++i) str[i] = 'a';
826 str[large_size - 1] = '\0'; 826 str[large_size - 1] = '\0';
827 objs[next_objs_index++] = 827 objs[next_objs_index++] =
828 FACTORY->NewStringFromAscii(CStrVector(str), TENURED); 828 FACTORY->NewStringFromAscii(CStrVector(str), TENURED);
829 delete[] str; 829 delete[] str;
830 830
831 // Add a Map object to look for. 831 // Add a Map object to look for.
832 objs[next_objs_index++] = Handle<Map>(HeapObject::cast(*objs[0])->map()); 832 objs[next_objs_index++] = Handle<Map>(HeapObject::cast(*objs[0])->map());
833 833
(...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after
1619 // clearing correctly records slots in prototype transition array. 1619 // clearing correctly records slots in prototype transition array.
1620 i::FLAG_always_compact = true; 1620 i::FLAG_always_compact = true;
1621 Handle<Map> map(baseObject->map()); 1621 Handle<Map> map(baseObject->map());
1622 CHECK(!space->LastPage()->Contains(map->prototype_transitions()->address())); 1622 CHECK(!space->LastPage()->Contains(map->prototype_transitions()->address()));
1623 CHECK(space->LastPage()->Contains(prototype->address())); 1623 CHECK(space->LastPage()->Contains(prototype->address()));
1624 baseObject->SetPrototype(*prototype, false)->ToObjectChecked(); 1624 baseObject->SetPrototype(*prototype, false)->ToObjectChecked();
1625 CHECK(map->GetPrototypeTransition(*prototype)->IsMap()); 1625 CHECK(map->GetPrototypeTransition(*prototype)->IsMap());
1626 HEAP->CollectAllGarbage(Heap::kNoGCFlags); 1626 HEAP->CollectAllGarbage(Heap::kNoGCFlags);
1627 CHECK(map->GetPrototypeTransition(*prototype)->IsMap()); 1627 CHECK(map->GetPrototypeTransition(*prototype)->IsMap());
1628 } 1628 }
OLDNEW
« no previous file with comments | « test/cctest/test-alloc.cc ('k') | test/cctest/test-mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698