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

Unified Diff: src/heap.cc

Issue 14888005: Make Object.freeze fast (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Handle review comments Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap.h ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index a69c539911da64045d1cae9f109e7847d2d83b07..bb982b4f136685cc5d79d18bbc5f859aa16b751c 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -2964,6 +2964,17 @@ bool Heap::CreateInitialObjects() {
}
set_observation_state(JSObject::cast(obj));
+ { MaybeObject* maybe_obj = AllocateSymbol();
+ if (!maybe_obj->ToObject(&obj)) return false;
+ }
+ set_frozen_symbol(Symbol::cast(obj));
+
+ { MaybeObject* maybe_obj = SeededNumberDictionary::Allocate(this, 0, TENURED);
+ if (!maybe_obj->ToObject(&obj)) return false;
+ }
+ SeededNumberDictionary::cast(obj)->set_requires_slow_elements();
+ set_empty_slow_element_dictionary(SeededNumberDictionary::cast(obj));
+
// Handling of script id generation is in FACTORY->NewScript.
set_last_script_id(undefined_value());
« no previous file with comments | « src/heap.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698