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

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

Issue 241023002: Make Heap::AllocateRaw*String private. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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 | « src/heap.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 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // for specific kinds. 48 // for specific kinds.
49 CHECK(!heap->AllocateFixedArray(100)->IsFailure()); 49 CHECK(!heap->AllocateFixedArray(100)->IsFailure());
50 CHECK(!heap->AllocateHeapNumber(0.42)->IsFailure()); 50 CHECK(!heap->AllocateHeapNumber(0.42)->IsFailure());
51 CHECK(!heap->AllocateArgumentsObject(Smi::FromInt(87), 10)->IsFailure()); 51 CHECK(!heap->AllocateArgumentsObject(Smi::FromInt(87), 10)->IsFailure());
52 Object* object = heap->AllocateJSObject( 52 Object* object = heap->AllocateJSObject(
53 *CcTest::i_isolate()->object_function())->ToObjectChecked(); 53 *CcTest::i_isolate()->object_function())->ToObjectChecked();
54 CHECK(!heap->CopyJSObject(JSObject::cast(object))->IsFailure()); 54 CHECK(!heap->CopyJSObject(JSObject::cast(object))->IsFailure());
55 55
56 // Old data space. 56 // Old data space.
57 SimulateFullSpace(heap->old_data_space()); 57 SimulateFullSpace(heap->old_data_space());
58 CHECK(!heap->AllocateRawOneByteString(100, TENURED)->IsFailure()); 58 CHECK(!heap->AllocateByteArray(100, TENURED)->IsFailure());
59 59
60 // Old pointer space. 60 // Old pointer space.
61 SimulateFullSpace(heap->old_pointer_space()); 61 SimulateFullSpace(heap->old_pointer_space());
62 CHECK(!heap->AllocateFixedArray(10000, TENURED)->IsFailure()); 62 CHECK(!heap->AllocateFixedArray(10000, TENURED)->IsFailure());
63 63
64 // Large object space. 64 // Large object space.
65 static const int kLargeObjectSpaceFillerLength = 300000; 65 static const int kLargeObjectSpaceFillerLength = 300000;
66 static const int kLargeObjectSpaceFillerSize = FixedArray::SizeFor( 66 static const int kLargeObjectSpaceFillerSize = FixedArray::SizeFor(
67 kLargeObjectSpaceFillerLength); 67 kLargeObjectSpaceFillerLength);
68 ASSERT(kLargeObjectSpaceFillerSize > heap->old_pointer_space()->AreaSize()); 68 ASSERT(kLargeObjectSpaceFillerSize > heap->old_pointer_space()->AreaSize());
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 if (index < blocks.length() - 1) { 216 if (index < blocks.length() - 1) {
217 blocks[index] = blocks.RemoveLast(); 217 blocks[index] = blocks.RemoveLast();
218 } else { 218 } else {
219 blocks.RemoveLast(); 219 blocks.RemoveLast();
220 } 220 }
221 } 221 }
222 } 222 }
223 223
224 code_range.TearDown(); 224 code_range.TearDown();
225 } 225 }
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698