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

Side by Side Diff: src/heap.cc

Issue 196103004: Add support for per-isolate private symbols (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: More comments; force dictionary mode Created 6 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/heap.h ('k') | src/isolate.h » ('j') | src/isolate.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3270 matching lines...) Expand 10 before | Expand all | Expand 10 after
3281 { MaybeObject* maybe_obj = AllocateFixedArray(Natives::GetBuiltinsCount()); 3281 { MaybeObject* maybe_obj = AllocateFixedArray(Natives::GetBuiltinsCount());
3282 if (!maybe_obj->ToObject(&obj)) return false; 3282 if (!maybe_obj->ToObject(&obj)) return false;
3283 } 3283 }
3284 set_natives_source_cache(FixedArray::cast(obj)); 3284 set_natives_source_cache(FixedArray::cast(obj));
3285 3285
3286 { MaybeObject* maybe_obj = AllocateCell(undefined_value()); 3286 { MaybeObject* maybe_obj = AllocateCell(undefined_value());
3287 if (!maybe_obj->ToObject(&obj)) return false; 3287 if (!maybe_obj->ToObject(&obj)) return false;
3288 } 3288 }
3289 set_undefined_cell(Cell::cast(obj)); 3289 set_undefined_cell(Cell::cast(obj));
3290 3290
3291 // Allocate objects to hold symbol registry. 3291 // The symbol registry is initialized lazily.
3292 { MaybeObject* maybe_obj = AllocateMap(JS_OBJECT_TYPE, JSObject::kHeaderSize); 3292 set_symbol_registry(undefined_value());
3293 if (!maybe_obj->ToObject(&obj)) return false;
3294 maybe_obj = AllocateJSObjectFromMap(Map::cast(obj));
3295 if (!maybe_obj->ToObject(&obj)) return false;
3296 }
3297 set_symbol_registry(JSObject::cast(obj));
3298 3293
3299 // Allocate object to hold object observation state. 3294 // Allocate object to hold object observation state.
3300 { MaybeObject* maybe_obj = AllocateMap(JS_OBJECT_TYPE, JSObject::kHeaderSize); 3295 { MaybeObject* maybe_obj = AllocateMap(JS_OBJECT_TYPE, JSObject::kHeaderSize);
3301 if (!maybe_obj->ToObject(&obj)) return false; 3296 if (!maybe_obj->ToObject(&obj)) return false;
3302 } 3297 }
3303 { MaybeObject* maybe_obj = AllocateJSObjectFromMap(Map::cast(obj)); 3298 { MaybeObject* maybe_obj = AllocateJSObjectFromMap(Map::cast(obj));
3304 if (!maybe_obj->ToObject(&obj)) return false; 3299 if (!maybe_obj->ToObject(&obj)) return false;
3305 } 3300 }
3306 set_observation_state(JSObject::cast(obj)); 3301 set_observation_state(JSObject::cast(obj));
3307 3302
(...skipping 4501 matching lines...) Expand 10 before | Expand all | Expand 10 after
7809 static_cast<int>(object_sizes_last_time_[index])); 7804 static_cast<int>(object_sizes_last_time_[index]));
7810 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 7805 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
7811 #undef ADJUST_LAST_TIME_OBJECT_COUNT 7806 #undef ADJUST_LAST_TIME_OBJECT_COUNT
7812 7807
7813 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 7808 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
7814 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 7809 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
7815 ClearObjectStats(); 7810 ClearObjectStats();
7816 } 7811 }
7817 7812
7818 } } // namespace v8::internal 7813 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.h ('k') | src/isolate.h » ('j') | src/isolate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698