OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1180 obj = AllocateMap(MEDIUM_ASCII_STRING_TYPE, SeqAsciiString::kAlignedSize); | 1180 obj = AllocateMap(MEDIUM_ASCII_STRING_TYPE, SeqAsciiString::kAlignedSize); |
1181 if (obj->IsFailure()) return false; | 1181 if (obj->IsFailure()) return false; |
1182 set_undetectable_medium_ascii_string_map(Map::cast(obj)); | 1182 set_undetectable_medium_ascii_string_map(Map::cast(obj)); |
1183 Map::cast(obj)->set_is_undetectable(); | 1183 Map::cast(obj)->set_is_undetectable(); |
1184 | 1184 |
1185 obj = AllocateMap(LONG_ASCII_STRING_TYPE, SeqAsciiString::kAlignedSize); | 1185 obj = AllocateMap(LONG_ASCII_STRING_TYPE, SeqAsciiString::kAlignedSize); |
1186 if (obj->IsFailure()) return false; | 1186 if (obj->IsFailure()) return false; |
1187 set_undetectable_long_ascii_string_map(Map::cast(obj)); | 1187 set_undetectable_long_ascii_string_map(Map::cast(obj)); |
1188 Map::cast(obj)->set_is_undetectable(); | 1188 Map::cast(obj)->set_is_undetectable(); |
1189 | 1189 |
1190 obj = AllocateMap(BYTE_ARRAY_TYPE, Array::kAlignedSize); | 1190 obj = AllocateMap(BYTE_ARRAY_TYPE, ByteArray::kAlignedSize); |
1191 if (obj->IsFailure()) return false; | 1191 if (obj->IsFailure()) return false; |
1192 set_byte_array_map(Map::cast(obj)); | 1192 set_byte_array_map(Map::cast(obj)); |
1193 | 1193 |
1194 obj = AllocateMap(CODE_TYPE, Code::kHeaderSize); | 1194 obj = AllocateMap(CODE_TYPE, Code::kHeaderSize); |
1195 if (obj->IsFailure()) return false; | 1195 if (obj->IsFailure()) return false; |
1196 set_code_map(Map::cast(obj)); | 1196 set_code_map(Map::cast(obj)); |
1197 | 1197 |
1198 obj = AllocateMap(JS_GLOBAL_PROPERTY_CELL_TYPE, | 1198 obj = AllocateMap(JS_GLOBAL_PROPERTY_CELL_TYPE, |
1199 JSGlobalPropertyCell::kSize); | 1199 JSGlobalPropertyCell::kSize); |
1200 if (obj->IsFailure()) return false; | 1200 if (obj->IsFailure()) return false; |
(...skipping 2514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3715 #ifdef DEBUG | 3715 #ifdef DEBUG |
3716 bool Heap::GarbageCollectionGreedyCheck() { | 3716 bool Heap::GarbageCollectionGreedyCheck() { |
3717 ASSERT(FLAG_gc_greedy); | 3717 ASSERT(FLAG_gc_greedy); |
3718 if (Bootstrapper::IsActive()) return true; | 3718 if (Bootstrapper::IsActive()) return true; |
3719 if (disallow_allocation_failure()) return true; | 3719 if (disallow_allocation_failure()) return true; |
3720 return CollectGarbage(0, NEW_SPACE); | 3720 return CollectGarbage(0, NEW_SPACE); |
3721 } | 3721 } |
3722 #endif | 3722 #endif |
3723 | 3723 |
3724 } } // namespace v8::internal | 3724 } } // namespace v8::internal |
OLD | NEW |