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

Side by Side Diff: src/heap.cc

Issue 117483002: Make cells pointing to JSObjects weak in optimized code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Handle cells that are saved as embedded objects in reloc info. Created 6 years, 11 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
OLDNEW
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 3381 matching lines...) Expand 10 before | Expand all | Expand 10 after
3392 if (!maybe_obj->ToObject(&obj)) return false; 3392 if (!maybe_obj->ToObject(&obj)) return false;
3393 } 3393 }
3394 set_regexp_multiple_cache(FixedArray::cast(obj)); 3394 set_regexp_multiple_cache(FixedArray::cast(obj));
3395 3395
3396 // Allocate cache for external strings pointing to native source code. 3396 // Allocate cache for external strings pointing to native source code.
3397 { MaybeObject* maybe_obj = AllocateFixedArray(Natives::GetBuiltinsCount()); 3397 { MaybeObject* maybe_obj = AllocateFixedArray(Natives::GetBuiltinsCount());
3398 if (!maybe_obj->ToObject(&obj)) return false; 3398 if (!maybe_obj->ToObject(&obj)) return false;
3399 } 3399 }
3400 set_natives_source_cache(FixedArray::cast(obj)); 3400 set_natives_source_cache(FixedArray::cast(obj));
3401 3401
3402 { MaybeObject* maybe_obj = AllocateCell(undefined_value());
3403 if (!maybe_obj->ToObject(&obj)) return false;
3404 }
3405 set_undefined_cell(Cell::cast(obj));
3406
3402 // Allocate object to hold object observation state. 3407 // Allocate object to hold object observation state.
3403 { MaybeObject* maybe_obj = AllocateMap(JS_OBJECT_TYPE, JSObject::kHeaderSize); 3408 { MaybeObject* maybe_obj = AllocateMap(JS_OBJECT_TYPE, JSObject::kHeaderSize);
3404 if (!maybe_obj->ToObject(&obj)) return false; 3409 if (!maybe_obj->ToObject(&obj)) return false;
3405 } 3410 }
3406 { MaybeObject* maybe_obj = AllocateJSObjectFromMap(Map::cast(obj)); 3411 { MaybeObject* maybe_obj = AllocateJSObjectFromMap(Map::cast(obj));
3407 if (!maybe_obj->ToObject(&obj)) return false; 3412 if (!maybe_obj->ToObject(&obj)) return false;
3408 } 3413 }
3409 set_observation_state(JSObject::cast(obj)); 3414 set_observation_state(JSObject::cast(obj));
3410 3415
3411 { MaybeObject* maybe_obj = AllocateSymbol(); 3416 { MaybeObject* maybe_obj = AllocateSymbol();
(...skipping 4372 matching lines...) Expand 10 before | Expand all | Expand 10 after
7784 static_cast<int>(object_sizes_last_time_[index])); 7789 static_cast<int>(object_sizes_last_time_[index]));
7785 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 7790 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
7786 #undef ADJUST_LAST_TIME_OBJECT_COUNT 7791 #undef ADJUST_LAST_TIME_OBJECT_COUNT
7787 7792
7788 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 7793 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
7789 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 7794 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
7790 ClearObjectStats(); 7795 ClearObjectStats();
7791 } 7796 }
7792 7797
7793 } } // namespace v8::internal 7798 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.h ('k') | src/lithium-codegen.cc » ('j') | test/cctest/test-heap.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698