| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 // for specific kinds. | 69 // for specific kinds. |
| 70 CHECK(!heap->AllocateFixedArray(100)->IsFailure()); | 70 CHECK(!heap->AllocateFixedArray(100)->IsFailure()); |
| 71 CHECK(!heap->AllocateHeapNumber(0.42)->IsFailure()); | 71 CHECK(!heap->AllocateHeapNumber(0.42)->IsFailure()); |
| 72 CHECK(!heap->AllocateArgumentsObject(Smi::FromInt(87), 10)->IsFailure()); | 72 CHECK(!heap->AllocateArgumentsObject(Smi::FromInt(87), 10)->IsFailure()); |
| 73 Object* object = heap->AllocateJSObject( | 73 Object* object = heap->AllocateJSObject( |
| 74 *Isolate::Current()->object_function())->ToObjectChecked(); | 74 *Isolate::Current()->object_function())->ToObjectChecked(); |
| 75 CHECK(!heap->CopyJSObject(JSObject::cast(object))->IsFailure()); | 75 CHECK(!heap->CopyJSObject(JSObject::cast(object))->IsFailure()); |
| 76 | 76 |
| 77 // Old data space. | 77 // Old data space. |
| 78 SimulateFullSpace(heap->old_data_space()); | 78 SimulateFullSpace(heap->old_data_space()); |
| 79 CHECK(!heap->AllocateRawAsciiString(100, TENURED)->IsFailure()); | 79 CHECK(!heap->AllocateRawOneByteString(100, TENURED)->IsFailure()); |
| 80 | 80 |
| 81 // Old pointer space. | 81 // Old pointer space. |
| 82 SimulateFullSpace(heap->old_pointer_space()); | 82 SimulateFullSpace(heap->old_pointer_space()); |
| 83 CHECK(!heap->AllocateFixedArray(10000, TENURED)->IsFailure()); | 83 CHECK(!heap->AllocateFixedArray(10000, TENURED)->IsFailure()); |
| 84 | 84 |
| 85 // Large object space. | 85 // Large object space. |
| 86 static const int kLargeObjectSpaceFillerLength = 300000; | 86 static const int kLargeObjectSpaceFillerLength = 300000; |
| 87 static const int kLargeObjectSpaceFillerSize = FixedArray::SizeFor( | 87 static const int kLargeObjectSpaceFillerSize = FixedArray::SizeFor( |
| 88 kLargeObjectSpaceFillerLength); | 88 kLargeObjectSpaceFillerLength); |
| 89 ASSERT(kLargeObjectSpaceFillerSize > heap->old_pointer_space()->AreaSize()); | 89 ASSERT(kLargeObjectSpaceFillerSize > heap->old_pointer_space()->AreaSize()); |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 blocks[index] = blocks.RemoveLast(); | 238 blocks[index] = blocks.RemoveLast(); |
| 239 } else { | 239 } else { |
| 240 blocks.RemoveLast(); | 240 blocks.RemoveLast(); |
| 241 } | 241 } |
| 242 } | 242 } |
| 243 } | 243 } |
| 244 | 244 |
| 245 code_range->TearDown(); | 245 code_range->TearDown(); |
| 246 delete code_range; | 246 delete code_range; |
| 247 } | 247 } |
| OLD | NEW |