OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 CHECK_EQ(type, map->instance_type()); | 53 CHECK_EQ(type, map->instance_type()); |
54 CHECK_EQ(instance_size, map->instance_size()); | 54 CHECK_EQ(instance_size, map->instance_size()); |
55 } | 55 } |
56 | 56 |
57 | 57 |
58 TEST(HeapMaps) { | 58 TEST(HeapMaps) { |
59 CcTest::InitializeVM(); | 59 CcTest::InitializeVM(); |
60 Heap* heap = CcTest::heap(); | 60 Heap* heap = CcTest::heap(); |
61 CheckMap(heap->meta_map(), MAP_TYPE, Map::kSize); | 61 CheckMap(heap->meta_map(), MAP_TYPE, Map::kSize); |
62 CheckMap(heap->heap_number_map(), HEAP_NUMBER_TYPE, HeapNumber::kSize); | 62 CheckMap(heap->heap_number_map(), HEAP_NUMBER_TYPE, HeapNumber::kSize); |
63 CheckMap(heap->float32x4_map(), FLOAT32X4_TYPE, Float32x4::kSize); | 63 #define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \ |
| 64 CheckMap(heap->type##_map(), SIMD128_VALUE_TYPE, Type::kSize); |
| 65 SIMD128_TYPES(SIMD128_TYPE) |
| 66 #undef SIMD128_TYPE |
64 CheckMap(heap->fixed_array_map(), FIXED_ARRAY_TYPE, kVariableSizeSentinel); | 67 CheckMap(heap->fixed_array_map(), FIXED_ARRAY_TYPE, kVariableSizeSentinel); |
65 CheckMap(heap->string_map(), STRING_TYPE, kVariableSizeSentinel); | 68 CheckMap(heap->string_map(), STRING_TYPE, kVariableSizeSentinel); |
66 } | 69 } |
67 | 70 |
68 | 71 |
69 static void CheckOddball(Isolate* isolate, Object* obj, const char* string) { | 72 static void CheckOddball(Isolate* isolate, Object* obj, const char* string) { |
70 CHECK(obj->IsOddball()); | 73 CHECK(obj->IsOddball()); |
71 Handle<Object> handle(obj, isolate); | 74 Handle<Object> handle(obj, isolate); |
72 Object* print_string = | 75 Object* print_string = |
73 *Execution::ToString(isolate, handle).ToHandleChecked(); | 76 *Execution::ToString(isolate, handle).ToHandleChecked(); |
(...skipping 6303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6377 | 6380 |
6378 PrintF("Context size : %d bytes\n", measure.Size()); | 6381 PrintF("Context size : %d bytes\n", measure.Size()); |
6379 PrintF("Context object count: %d\n", measure.Count()); | 6382 PrintF("Context object count: %d\n", measure.Count()); |
6380 | 6383 |
6381 CHECK_LE(1000, measure.Count()); | 6384 CHECK_LE(1000, measure.Count()); |
6382 CHECK_LE(50000, measure.Size()); | 6385 CHECK_LE(50000, measure.Size()); |
6383 | 6386 |
6384 CHECK_LE(measure.Count(), count_upper_limit); | 6387 CHECK_LE(measure.Count(), count_upper_limit); |
6385 CHECK_LE(measure.Size(), size_upper_limit); | 6388 CHECK_LE(measure.Size(), size_upper_limit); |
6386 } | 6389 } |
OLD | NEW |