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

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

Issue 3197010: Version 2.3.10... (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 10 years, 4 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-api.cc ('k') | test/cctest/test-heap-profiler.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 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 18 matching lines...) Expand all
29 CHECK_EQ(Heap::meta_map(), map->map()); 29 CHECK_EQ(Heap::meta_map(), map->map());
30 CHECK_EQ(type, map->instance_type()); 30 CHECK_EQ(type, map->instance_type());
31 CHECK_EQ(instance_size, map->instance_size()); 31 CHECK_EQ(instance_size, map->instance_size());
32 } 32 }
33 33
34 34
35 TEST(HeapMaps) { 35 TEST(HeapMaps) {
36 InitializeVM(); 36 InitializeVM();
37 CheckMap(Heap::meta_map(), MAP_TYPE, Map::kSize); 37 CheckMap(Heap::meta_map(), MAP_TYPE, Map::kSize);
38 CheckMap(Heap::heap_number_map(), HEAP_NUMBER_TYPE, HeapNumber::kSize); 38 CheckMap(Heap::heap_number_map(), HEAP_NUMBER_TYPE, HeapNumber::kSize);
39 CheckMap(Heap::fixed_array_map(), FIXED_ARRAY_TYPE, FixedArray::kHeaderSize); 39 CheckMap(Heap::fixed_array_map(), FIXED_ARRAY_TYPE, kVariableSizeSentinel);
40 CheckMap(Heap::string_map(), STRING_TYPE, SeqTwoByteString::kAlignedSize); 40 CheckMap(Heap::string_map(), STRING_TYPE, kVariableSizeSentinel);
41 } 41 }
42 42
43 43
44 static void CheckOddball(Object* obj, const char* string) { 44 static void CheckOddball(Object* obj, const char* string) {
45 CHECK(obj->IsOddball()); 45 CHECK(obj->IsOddball());
46 bool exc; 46 bool exc;
47 Object* print_string = *Execution::ToString(Handle<Object>(obj), &exc); 47 Object* print_string = *Execution::ToString(Handle<Object>(obj), &exc);
48 CHECK(String::cast(print_string)->IsEqualTo(CStrVector(string))); 48 CHECK(String::cast(print_string)->IsEqualTo(CStrVector(string)));
49 } 49 }
50 50
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 Heap::CollectAllGarbage(true); 983 Heap::CollectAllGarbage(true);
984 984
985 // foo should no longer be in the compilation cache 985 // foo should no longer be in the compilation cache
986 CHECK(!function->shared()->is_compiled()); 986 CHECK(!function->shared()->is_compiled());
987 CHECK(!function->is_compiled()); 987 CHECK(!function->is_compiled());
988 // Call foo to get it recompiled. 988 // Call foo to get it recompiled.
989 CompileRun("foo()"); 989 CompileRun("foo()");
990 CHECK(function->shared()->is_compiled()); 990 CHECK(function->shared()->is_compiled());
991 CHECK(function->is_compiled()); 991 CHECK(function->is_compiled());
992 } 992 }
OLDNEW
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/cctest/test-heap-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698