OLD | NEW |
1 // Copyright 2007-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2008 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 CHECK(!Heap::AllocateFixedArray(100)->IsFailure()); | 60 CHECK(!Heap::AllocateFixedArray(100)->IsFailure()); |
61 CHECK(!Heap::AllocateHeapNumber(0.42)->IsFailure()); | 61 CHECK(!Heap::AllocateHeapNumber(0.42)->IsFailure()); |
62 CHECK(!Heap::AllocateArgumentsObject(Smi::FromInt(87), 10)->IsFailure()); | 62 CHECK(!Heap::AllocateArgumentsObject(Smi::FromInt(87), 10)->IsFailure()); |
63 Object* object = Heap::AllocateJSObject(*Top::object_function()); | 63 Object* object = Heap::AllocateJSObject(*Top::object_function()); |
64 CHECK(!Heap::CopyJSObject(JSObject::cast(object))->IsFailure()); | 64 CHECK(!Heap::CopyJSObject(JSObject::cast(object))->IsFailure()); |
65 | 65 |
66 // Old data space. | 66 // Old data space. |
67 OldSpace* old_data_space = Heap::old_data_space(); | 67 OldSpace* old_data_space = Heap::old_data_space(); |
68 static const int kOldDataSpaceFillerSize = ByteArray::SizeFor(0); | 68 static const int kOldDataSpaceFillerSize = ByteArray::SizeFor(0); |
69 while (old_data_space->Available() > kOldDataSpaceFillerSize) { | 69 while (old_data_space->Available() > kOldDataSpaceFillerSize) { |
70 CHECK(!Heap::Heap::AllocateByteArray(0, TENURED)->IsFailure()); | 70 CHECK(!Heap::AllocateByteArray(0, TENURED)->IsFailure()); |
71 } | 71 } |
72 CHECK(!Heap::AllocateRawAsciiString(100, TENURED)->IsFailure()); | 72 CHECK(!Heap::AllocateRawAsciiString(100, TENURED)->IsFailure()); |
73 | 73 |
74 // Large object space. | 74 // Large object space. |
75 while (!Heap::OldGenerationAllocationLimitReached()) { | 75 while (!Heap::OldGenerationAllocationLimitReached()) { |
76 CHECK(!Heap::AllocateFixedArray(10000, TENURED)->IsFailure()); | 76 CHECK(!Heap::AllocateFixedArray(10000, TENURED)->IsFailure()); |
77 } | 77 } |
78 CHECK(!Heap::AllocateFixedArray(10000, TENURED)->IsFailure()); | 78 CHECK(!Heap::AllocateFixedArray(10000, TENURED)->IsFailure()); |
79 | 79 |
80 // Map space. | 80 // Map space. |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 if (index < blocks.length() - 1) { | 206 if (index < blocks.length() - 1) { |
207 blocks[index] = blocks.RemoveLast(); | 207 blocks[index] = blocks.RemoveLast(); |
208 } else { | 208 } else { |
209 blocks.RemoveLast(); | 209 blocks.RemoveLast(); |
210 } | 210 } |
211 } | 211 } |
212 } | 212 } |
213 | 213 |
214 CodeRange::TearDown(); | 214 CodeRange::TearDown(); |
215 } | 215 } |
OLD | NEW |