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

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

Issue 1731063007: Remove the global Strength enum class completely. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_strong-remove-literals
Patch Set: Remove more cruft. Created 4 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
OLDNEW
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 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after
1157 v8::HandleScope scope(CcTest::isolate()); 1157 v8::HandleScope scope(CcTest::isolate());
1158 1158
1159 // Array of objects to scan haep for. 1159 // Array of objects to scan haep for.
1160 const int objs_count = 6; 1160 const int objs_count = 6;
1161 Handle<Object> objs[objs_count]; 1161 Handle<Object> objs[objs_count];
1162 int next_objs_index = 0; 1162 int next_objs_index = 0;
1163 1163
1164 // Allocate a JS array to OLD_SPACE and NEW_SPACE 1164 // Allocate a JS array to OLD_SPACE and NEW_SPACE
1165 objs[next_objs_index++] = factory->NewJSArray(10); 1165 objs[next_objs_index++] = factory->NewJSArray(10);
1166 objs[next_objs_index++] = 1166 objs[next_objs_index++] =
1167 factory->NewJSArray(10, FAST_HOLEY_ELEMENTS, Strength::WEAK, TENURED); 1167 factory->NewJSArray(10, FAST_HOLEY_ELEMENTS, TENURED);
1168 1168
1169 // Allocate a small string to OLD_DATA_SPACE and NEW_SPACE 1169 // Allocate a small string to OLD_DATA_SPACE and NEW_SPACE
1170 objs[next_objs_index++] = factory->NewStringFromStaticChars("abcdefghij"); 1170 objs[next_objs_index++] = factory->NewStringFromStaticChars("abcdefghij");
1171 objs[next_objs_index++] = 1171 objs[next_objs_index++] =
1172 factory->NewStringFromStaticChars("abcdefghij", TENURED); 1172 factory->NewStringFromStaticChars("abcdefghij", TENURED);
1173 1173
1174 // Allocate a large string (for large object space). 1174 // Allocate a large string (for large object space).
1175 int large_size = Page::kMaxRegularHeapObjectSize + 1; 1175 int large_size = Page::kMaxRegularHeapObjectSize + 1;
1176 char* str = new char[large_size]; 1176 char* str = new char[large_size];
1177 for (int i = 0; i < large_size - 1; ++i) str[i] = 'a'; 1177 for (int i = 0; i < large_size - 1; ++i) str[i] = 'a';
(...skipping 5425 matching lines...) Expand 10 before | Expand all | Expand 10 after
6603 heap->RightTrimFixedArray<Heap::CONCURRENT_TO_SWEEPER>(arrays[j], N - 1); 6603 heap->RightTrimFixedArray<Heap::CONCURRENT_TO_SWEEPER>(arrays[j], N - 1);
6604 } 6604 }
6605 } 6605 }
6606 // Force allocation from the free list. 6606 // Force allocation from the free list.
6607 heap->set_force_oom(true); 6607 heap->set_force_oom(true);
6608 heap->CollectGarbage(OLD_SPACE); 6608 heap->CollectGarbage(OLD_SPACE);
6609 } 6609 }
6610 6610
6611 } // namespace internal 6611 } // namespace internal
6612 } // namespace v8 6612 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime-scopes.cc ('k') | test/cctest/interpreter/bytecode_expectations/CallRuntime.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698