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

Side by Side Diff: src/heap.cc

Issue 155687: Make Array::kHeaderSize protected, and only use kHeaderSize of its subclasses... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 5 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/arm/macro-assembler-arm.cc ('k') | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698