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

Side by Side Diff: src/heap.cc

Issue 8520006: Optimize the equality check case of ICCompare stubs. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 1 month 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 2350 matching lines...) Expand 10 before | Expand all | Expand 10 after
2361 } 2361 }
2362 set_prototype_accessors(Foreign::cast(obj)); 2362 set_prototype_accessors(Foreign::cast(obj));
2363 2363
2364 // Allocate the code_stubs dictionary. The initial size is set to avoid 2364 // Allocate the code_stubs dictionary. The initial size is set to avoid
2365 // expanding the dictionary during bootstrapping. 2365 // expanding the dictionary during bootstrapping.
2366 { MaybeObject* maybe_obj = NumberDictionary::Allocate(128); 2366 { MaybeObject* maybe_obj = NumberDictionary::Allocate(128);
2367 if (!maybe_obj->ToObject(&obj)) return false; 2367 if (!maybe_obj->ToObject(&obj)) return false;
2368 } 2368 }
2369 set_code_stubs(NumberDictionary::cast(obj)); 2369 set_code_stubs(NumberDictionary::cast(obj));
2370 2370
2371
2372 // Allocate the known objects compare stub dictionary.
2373 { MaybeObject* maybe_obj = NumberDictionary::Allocate(4);
2374 if (!maybe_obj->ToObject(&obj)) return false;
2375 }
2376 set_compare_stubs_known_objects(NumberDictionary::cast(obj));
2377
2378
2371 // Allocate the non_monomorphic_cache used in stub-cache.cc. The initial size 2379 // Allocate the non_monomorphic_cache used in stub-cache.cc. The initial size
2372 // is set to avoid expanding the dictionary during bootstrapping. 2380 // is set to avoid expanding the dictionary during bootstrapping.
2373 { MaybeObject* maybe_obj = NumberDictionary::Allocate(64); 2381 { MaybeObject* maybe_obj = NumberDictionary::Allocate(64);
2374 if (!maybe_obj->ToObject(&obj)) return false; 2382 if (!maybe_obj->ToObject(&obj)) return false;
2375 } 2383 }
2376 set_non_monomorphic_cache(NumberDictionary::cast(obj)); 2384 set_non_monomorphic_cache(NumberDictionary::cast(obj));
2377 2385
2378 { MaybeObject* maybe_obj = AllocatePolymorphicCodeCache(); 2386 { MaybeObject* maybe_obj = AllocatePolymorphicCodeCache();
2379 if (!maybe_obj->ToObject(&obj)) return false; 2387 if (!maybe_obj->ToObject(&obj)) return false;
2380 } 2388 }
(...skipping 4074 matching lines...) Expand 10 before | Expand all | Expand 10 after
6455 isolate_->heap()->store_buffer()->Compact(); 6463 isolate_->heap()->store_buffer()->Compact();
6456 isolate_->heap()->store_buffer()->Filter(MemoryChunk::ABOUT_TO_BE_FREED); 6464 isolate_->heap()->store_buffer()->Filter(MemoryChunk::ABOUT_TO_BE_FREED);
6457 for (chunk = chunks_queued_for_free_; chunk != NULL; chunk = next) { 6465 for (chunk = chunks_queued_for_free_; chunk != NULL; chunk = next) {
6458 next = chunk->next_chunk(); 6466 next = chunk->next_chunk();
6459 isolate_->memory_allocator()->Free(chunk); 6467 isolate_->memory_allocator()->Free(chunk);
6460 } 6468 }
6461 chunks_queued_for_free_ = NULL; 6469 chunks_queued_for_free_ = NULL;
6462 } 6470 }
6463 6471
6464 } } // namespace v8::internal 6472 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698