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

Side by Side Diff: src/heap.cc

Issue 669240: - Remove function boilerplate objects and use SharedFunctionInfos in... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Committed Created 10 years, 9 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/handles.cc ('k') | src/ia32/codegen-ia32.h » ('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 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after
1262 new_meta_map->set_map(new_meta_map); 1262 new_meta_map->set_map(new_meta_map);
1263 1263
1264 obj = AllocatePartialMap(FIXED_ARRAY_TYPE, FixedArray::kHeaderSize); 1264 obj = AllocatePartialMap(FIXED_ARRAY_TYPE, FixedArray::kHeaderSize);
1265 if (obj->IsFailure()) return false; 1265 if (obj->IsFailure()) return false;
1266 set_fixed_array_map(Map::cast(obj)); 1266 set_fixed_array_map(Map::cast(obj));
1267 1267
1268 obj = AllocatePartialMap(ODDBALL_TYPE, Oddball::kSize); 1268 obj = AllocatePartialMap(ODDBALL_TYPE, Oddball::kSize);
1269 if (obj->IsFailure()) return false; 1269 if (obj->IsFailure()) return false;
1270 set_oddball_map(Map::cast(obj)); 1270 set_oddball_map(Map::cast(obj));
1271 1271
1272 // Allocate the empty array 1272 // Allocate the empty array.
1273 obj = AllocateEmptyFixedArray(); 1273 obj = AllocateEmptyFixedArray();
1274 if (obj->IsFailure()) return false; 1274 if (obj->IsFailure()) return false;
1275 set_empty_fixed_array(FixedArray::cast(obj)); 1275 set_empty_fixed_array(FixedArray::cast(obj));
1276 1276
1277 obj = Allocate(oddball_map(), OLD_DATA_SPACE); 1277 obj = Allocate(oddball_map(), OLD_DATA_SPACE);
1278 if (obj->IsFailure()) return false; 1278 if (obj->IsFailure()) return false;
1279 set_null_value(obj); 1279 set_null_value(obj);
1280 1280
1281 // Allocate the empty descriptor array. 1281 // Allocate the empty descriptor array.
1282 obj = AllocateEmptyFixedArray(); 1282 obj = AllocateEmptyFixedArray();
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
1408 set_catch_context_map(Map::cast(obj)); 1408 set_catch_context_map(Map::cast(obj));
1409 1409
1410 obj = AllocateMap(FIXED_ARRAY_TYPE, HeapObject::kHeaderSize); 1410 obj = AllocateMap(FIXED_ARRAY_TYPE, HeapObject::kHeaderSize);
1411 if (obj->IsFailure()) return false; 1411 if (obj->IsFailure()) return false;
1412 set_global_context_map(Map::cast(obj)); 1412 set_global_context_map(Map::cast(obj));
1413 1413
1414 obj = AllocateMap(JS_FUNCTION_TYPE, JSFunction::kSize); 1414 obj = AllocateMap(JS_FUNCTION_TYPE, JSFunction::kSize);
1415 if (obj->IsFailure()) return false; 1415 if (obj->IsFailure()) return false;
1416 set_boilerplate_function_map(Map::cast(obj)); 1416 set_boilerplate_function_map(Map::cast(obj));
1417 1417
1418 obj = AllocateMap(SHARED_FUNCTION_INFO_TYPE, SharedFunctionInfo::kSize); 1418 obj = AllocateMap(SHARED_FUNCTION_INFO_TYPE,
1419 SharedFunctionInfo::kAlignedSize);
1419 if (obj->IsFailure()) return false; 1420 if (obj->IsFailure()) return false;
1420 set_shared_function_info_map(Map::cast(obj)); 1421 set_shared_function_info_map(Map::cast(obj));
1421 1422
1422 ASSERT(!Heap::InNewSpace(Heap::empty_fixed_array())); 1423 ASSERT(!Heap::InNewSpace(Heap::empty_fixed_array()));
1423 return true; 1424 return true;
1424 } 1425 }
1425 1426
1426 1427
1427 Object* Heap::AllocateHeapNumber(double value, PretenureFlag pretenure) { 1428 Object* Heap::AllocateHeapNumber(double value, PretenureFlag pretenure) {
1428 // Statically ensure that it is safe to allocate heap numbers in paged 1429 // Statically ensure that it is safe to allocate heap numbers in paged
(...skipping 2874 matching lines...) Expand 10 before | Expand all | Expand 10 after
4303 void ExternalStringTable::TearDown() { 4304 void ExternalStringTable::TearDown() {
4304 new_space_strings_.Free(); 4305 new_space_strings_.Free();
4305 old_space_strings_.Free(); 4306 old_space_strings_.Free();
4306 } 4307 }
4307 4308
4308 4309
4309 List<Object*> ExternalStringTable::new_space_strings_; 4310 List<Object*> ExternalStringTable::new_space_strings_;
4310 List<Object*> ExternalStringTable::old_space_strings_; 4311 List<Object*> ExternalStringTable::old_space_strings_;
4311 4312
4312 } } // namespace v8::internal 4313 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/handles.cc ('k') | src/ia32/codegen-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698