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

Side by Side Diff: src/mark-compact.cc

Issue 21065006: Replace HCheckPrototypeMaps by explicit map checks of constant values. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Prepare all HConstant js objects Created 7 years, 4 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/mark-compact.h ('k') | src/objects.h » ('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 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 if (FLAG_verify_native_context_separation) { 424 if (FLAG_verify_native_context_separation) {
425 VerifyNativeContextSeparation(heap_); 425 VerifyNativeContextSeparation(heap_);
426 } 426 }
427 #endif 427 #endif
428 428
429 #ifdef VERIFY_HEAP 429 #ifdef VERIFY_HEAP
430 if (FLAG_collect_maps && FLAG_weak_embedded_maps_in_optimized_code && 430 if (FLAG_collect_maps && FLAG_weak_embedded_maps_in_optimized_code &&
431 heap()->weak_embedded_maps_verification_enabled()) { 431 heap()->weak_embedded_maps_verification_enabled()) {
432 VerifyWeakEmbeddedMapsInOptimizedCode(); 432 VerifyWeakEmbeddedMapsInOptimizedCode();
433 } 433 }
434 if (FLAG_collect_maps && FLAG_omit_prototype_checks_for_leaf_maps) { 434 if (FLAG_collect_maps && FLAG_omit_map_checks_for_leaf_maps) {
435 VerifyOmittedPrototypeChecks(); 435 VerifyOmittedMapChecks();
436 } 436 }
437 #endif 437 #endif
438 438
439 Finish(); 439 Finish();
440 440
441 if (marking_parity_ == EVEN_MARKING_PARITY) { 441 if (marking_parity_ == EVEN_MARKING_PARITY) {
442 marking_parity_ = ODD_MARKING_PARITY; 442 marking_parity_ = ODD_MARKING_PARITY;
443 } else { 443 } else {
444 ASSERT(marking_parity_ == ODD_MARKING_PARITY); 444 ASSERT(marking_parity_ == ODD_MARKING_PARITY);
445 marking_parity_ = EVEN_MARKING_PARITY; 445 marking_parity_ = EVEN_MARKING_PARITY;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 obj != NULL; 496 obj != NULL;
497 obj = code_iterator.Next()) { 497 obj = code_iterator.Next()) {
498 Code* code = Code::cast(obj); 498 Code* code = Code::cast(obj);
499 if (code->kind() != Code::OPTIMIZED_FUNCTION) continue; 499 if (code->kind() != Code::OPTIMIZED_FUNCTION) continue;
500 if (WillBeDeoptimized(code)) continue; 500 if (WillBeDeoptimized(code)) continue;
501 code->VerifyEmbeddedMapsDependency(); 501 code->VerifyEmbeddedMapsDependency();
502 } 502 }
503 } 503 }
504 504
505 505
506 void MarkCompactCollector::VerifyOmittedPrototypeChecks() { 506 void MarkCompactCollector::VerifyOmittedMapChecks() {
507 HeapObjectIterator iterator(heap()->map_space()); 507 HeapObjectIterator iterator(heap()->map_space());
508 for (HeapObject* obj = iterator.Next(); 508 for (HeapObject* obj = iterator.Next();
509 obj != NULL; 509 obj != NULL;
510 obj = iterator.Next()) { 510 obj = iterator.Next()) {
511 Map* map = Map::cast(obj); 511 Map* map = Map::cast(obj);
512 map->VerifyOmittedPrototypeChecks(); 512 map->VerifyOmittedMapChecks();
513 } 513 }
514 } 514 }
515 #endif // VERIFY_HEAP 515 #endif // VERIFY_HEAP
516 516
517 517
518 static void ClearMarkbitsInPagedSpace(PagedSpace* space) { 518 static void ClearMarkbitsInPagedSpace(PagedSpace* space) {
519 PageIterator it(space); 519 PageIterator it(space);
520 520
521 while (it.has_next()) { 521 while (it.has_next()) {
522 Bitmap::Clear(it.next()); 522 Bitmap::Clear(it.next());
(...skipping 3819 matching lines...) Expand 10 before | Expand all | Expand 10 after
4342 while (buffer != NULL) { 4342 while (buffer != NULL) {
4343 SlotsBuffer* next_buffer = buffer->next(); 4343 SlotsBuffer* next_buffer = buffer->next();
4344 DeallocateBuffer(buffer); 4344 DeallocateBuffer(buffer);
4345 buffer = next_buffer; 4345 buffer = next_buffer;
4346 } 4346 }
4347 *buffer_address = NULL; 4347 *buffer_address = NULL;
4348 } 4348 }
4349 4349
4350 4350
4351 } } // namespace v8::internal 4351 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mark-compact.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698