Commit 601b776e authored by yangguo@chromium.org's avatar yangguo@chromium.org

Use hash map to look for objects in the root array when serializing.

R=mvstanton@chromium.org

Review URL: https://codereview.chromium.org/645533003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24826 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 98c20844
...@@ -1238,8 +1238,8 @@ Handle<SharedFunctionInfo> Compiler::CompileScript( ...@@ -1238,8 +1238,8 @@ Handle<SharedFunctionInfo> Compiler::CompileScript(
isolate->counters()->compile_serialize()); isolate->counters()->compile_serialize());
*cached_data = CodeSerializer::Serialize(isolate, result, source); *cached_data = CodeSerializer::Serialize(isolate, result, source);
if (FLAG_profile_deserialization) { if (FLAG_profile_deserialization) {
PrintF("[Compiling and serializing %d bytes took %0.3f ms]\n", PrintF("[Compiling and serializing took %0.3f ms]\n",
(*cached_data)->length(), timer.Elapsed().InMillisecondsF()); timer.Elapsed().InMillisecondsF());
} }
} }
} }
......
...@@ -699,7 +699,7 @@ void ExternalStringTable::ShrinkNewStrings(int position) { ...@@ -699,7 +699,7 @@ void ExternalStringTable::ShrinkNewStrings(int position) {
void Heap::ClearInstanceofCache() { void Heap::ClearInstanceofCache() {
set_instanceof_cache_function(the_hole_value()); set_instanceof_cache_function(Smi::FromInt(0));
} }
...@@ -709,8 +709,8 @@ Object* Heap::ToBoolean(bool condition) { ...@@ -709,8 +709,8 @@ Object* Heap::ToBoolean(bool condition) {
void Heap::CompletelyClearInstanceofCache() { void Heap::CompletelyClearInstanceofCache() {
set_instanceof_cache_map(the_hole_value()); set_instanceof_cache_map(Smi::FromInt(0));
set_instanceof_cache_function(the_hole_value()); set_instanceof_cache_function(Smi::FromInt(0));
} }
......
...@@ -2906,7 +2906,7 @@ void Heap::CreateInitialObjects() { ...@@ -2906,7 +2906,7 @@ void Heap::CreateInitialObjects() {
set_undefined_cell(*factory->NewCell(factory->undefined_value())); set_undefined_cell(*factory->NewCell(factory->undefined_value()));
// The symbol registry is initialized lazily. // The symbol registry is initialized lazily.
set_symbol_registry(undefined_value()); set_symbol_registry(Smi::FromInt(0));
// Allocate object to hold object observation state. // Allocate object to hold object observation state.
set_observation_state(*factory->NewJSObjectFromMap( set_observation_state(*factory->NewJSObjectFromMap(
......
...@@ -2206,7 +2206,7 @@ ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) ...@@ -2206,7 +2206,7 @@ ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET)
Handle<JSObject> Isolate::GetSymbolRegistry() { Handle<JSObject> Isolate::GetSymbolRegistry() {
if (heap()->symbol_registry()->IsUndefined()) { if (heap()->symbol_registry()->IsSmi()) {
Handle<Map> map = factory()->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize); Handle<Map> map = factory()->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize);
Handle<JSObject> registry = factory()->NewJSObjectFromMap(map); Handle<JSObject> registry = factory()->NewJSObjectFromMap(map);
heap()->set_symbol_registry(*registry); heap()->set_symbol_registry(*registry);
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment