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

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

Issue 7639020: Perform TODO(gc) cleanup for TODO-lockdown. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 9 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
« src/spaces.h ('K') | « test/cctest/test-mark-compact.cc ('k') | no next file » | 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 // 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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 234
235 235
236 TEST(LargeObjectSpace) { 236 TEST(LargeObjectSpace) {
237 v8::V8::Initialize(); 237 v8::V8::Initialize();
238 238
239 LargeObjectSpace* lo = HEAP->lo_space(); 239 LargeObjectSpace* lo = HEAP->lo_space();
240 CHECK(lo != NULL); 240 CHECK(lo != NULL);
241 241
242 int lo_size = Page::kPageSize; 242 int lo_size = Page::kPageSize;
243 243
244 Object* obj = lo->AllocateRawData(lo_size)->ToObjectUnchecked(); 244 Object* obj = lo->AllocateRaw(lo_size, NOT_EXECUTABLE)->ToObjectUnchecked();
245 CHECK(obj->IsHeapObject()); 245 CHECK(obj->IsHeapObject());
246 246
247 HeapObject* ho = HeapObject::cast(obj); 247 HeapObject* ho = HeapObject::cast(obj);
248 248
249 CHECK(lo->Contains(HeapObject::cast(obj))); 249 CHECK(lo->Contains(HeapObject::cast(obj)));
250 250
251 CHECK(lo->FindObject(ho->address()) == obj); 251 CHECK(lo->FindObject(ho->address()) == obj);
252 252
253 CHECK(lo->Contains(ho)); 253 CHECK(lo->Contains(ho));
254 254
255 while (true) { 255 while (true) {
256 intptr_t available = lo->Available(); 256 intptr_t available = lo->Available();
257 { MaybeObject* maybe_obj = lo->AllocateRawData(lo_size); 257 { MaybeObject* maybe_obj = lo->AllocateRaw(lo_size, NOT_EXECUTABLE);
258 if (!maybe_obj->ToObject(&obj)) break; 258 if (!maybe_obj->ToObject(&obj)) break;
259 } 259 }
260 CHECK(lo->Available() < available); 260 CHECK(lo->Available() < available);
261 }; 261 };
262 262
263 CHECK(!lo->IsEmpty()); 263 CHECK(!lo->IsEmpty());
264 264
265 CHECK(lo->AllocateRawData(lo_size)->IsFailure()); 265 CHECK(lo->AllocateRaw(lo_size, NOT_EXECUTABLE)->IsFailure());
266 } 266 }
OLDNEW
« src/spaces.h ('K') | « test/cctest/test-mark-compact.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698