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

Side by Side Diff: src/heap.cc

Issue 18221006: Add map transition for observed objects (Closed) Base URL: https://github.com/v8/v8.git@bleeding_edge
Patch Set: better check Created 7 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
« no previous file with comments | « src/heap.h ('k') | src/object-observe.js » ('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 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 3154 matching lines...) Expand 10 before | Expand all | Expand 10 after
3165 if (!maybe_obj->ToObject(&obj)) return false; 3165 if (!maybe_obj->ToObject(&obj)) return false;
3166 } 3166 }
3167 set_frozen_symbol(Symbol::cast(obj)); 3167 set_frozen_symbol(Symbol::cast(obj));
3168 3168
3169 { MaybeObject* maybe_obj = SeededNumberDictionary::Allocate(this, 0, TENURED); 3169 { MaybeObject* maybe_obj = SeededNumberDictionary::Allocate(this, 0, TENURED);
3170 if (!maybe_obj->ToObject(&obj)) return false; 3170 if (!maybe_obj->ToObject(&obj)) return false;
3171 } 3171 }
3172 SeededNumberDictionary::cast(obj)->set_requires_slow_elements(); 3172 SeededNumberDictionary::cast(obj)->set_requires_slow_elements();
3173 set_empty_slow_element_dictionary(SeededNumberDictionary::cast(obj)); 3173 set_empty_slow_element_dictionary(SeededNumberDictionary::cast(obj));
3174 3174
3175 { MaybeObject* maybe_obj = AllocateSymbol();
3176 if (!maybe_obj->ToObject(&obj)) return false;
3177 }
3178 set_observed_symbol(Symbol::cast(obj));
3179
3175 // Handling of script id generation is in Factory::NewScript. 3180 // Handling of script id generation is in Factory::NewScript.
3176 set_last_script_id(Smi::FromInt(v8::Script::kNoScriptId)); 3181 set_last_script_id(Smi::FromInt(v8::Script::kNoScriptId));
3177 3182
3178 // Initialize keyed lookup cache. 3183 // Initialize keyed lookup cache.
3179 isolate_->keyed_lookup_cache()->Clear(); 3184 isolate_->keyed_lookup_cache()->Clear();
3180 3185
3181 // Initialize context slot cache. 3186 // Initialize context slot cache.
3182 isolate_->context_slot_cache()->Clear(); 3187 isolate_->context_slot_cache()->Clear();
3183 3188
3184 // Initialize descriptor cache. 3189 // Initialize descriptor cache.
(...skipping 4951 matching lines...) Expand 10 before | Expand all | Expand 10 after
8136 if (FLAG_parallel_recompilation) { 8141 if (FLAG_parallel_recompilation) {
8137 heap_->relocation_mutex_->Lock(); 8142 heap_->relocation_mutex_->Lock();
8138 #ifdef DEBUG 8143 #ifdef DEBUG
8139 heap_->relocation_mutex_locked_by_optimizer_thread_ = 8144 heap_->relocation_mutex_locked_by_optimizer_thread_ =
8140 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); 8145 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread();
8141 #endif // DEBUG 8146 #endif // DEBUG
8142 } 8147 }
8143 } 8148 }
8144 8149
8145 } } // namespace v8::internal 8150 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.h ('k') | src/object-observe.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698