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

Side by Side Diff: src/assembler.cc

Issue 11118018: Enable --verify-heap in release mode (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 2 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/assembler.h ('k') | src/flag-definitions.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 (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 if (id != Deoptimizer::kNotDeoptimizationEntry) { 690 if (id != Deoptimizer::kNotDeoptimizationEntry) {
691 PrintF(out, " (deoptimization bailout %d)", id); 691 PrintF(out, " (deoptimization bailout %d)", id);
692 } 692 }
693 } 693 }
694 694
695 PrintF(out, "\n"); 695 PrintF(out, "\n");
696 } 696 }
697 #endif // ENABLE_DISASSEMBLER 697 #endif // ENABLE_DISASSEMBLER
698 698
699 699
700 #ifdef DEBUG 700 #ifdef VERIFY_HEAP
701 void RelocInfo::Verify() { 701 void RelocInfo::Verify() {
702 switch (rmode_) { 702 switch (rmode_) {
703 case EMBEDDED_OBJECT: 703 case EMBEDDED_OBJECT:
704 Object::VerifyPointer(target_object()); 704 Object::VerifyPointer(target_object());
705 break; 705 break;
706 case GLOBAL_PROPERTY_CELL: 706 case GLOBAL_PROPERTY_CELL:
707 Object::VerifyPointer(target_cell()); 707 Object::VerifyPointer(target_cell());
708 break; 708 break;
709 case DEBUG_BREAK: 709 case DEBUG_BREAK:
710 #ifndef ENABLE_DEBUGGER_SUPPORT 710 #ifndef ENABLE_DEBUGGER_SUPPORT
711 UNREACHABLE(); 711 UNREACHABLE();
712 break; 712 break;
713 #endif 713 #endif
714 case CONSTRUCT_CALL: 714 case CONSTRUCT_CALL:
715 case CODE_TARGET_CONTEXT: 715 case CODE_TARGET_CONTEXT:
716 case CODE_TARGET_WITH_ID: 716 case CODE_TARGET_WITH_ID:
717 case CODE_TARGET: { 717 case CODE_TARGET: {
718 // convert inline target address to code object 718 // convert inline target address to code object
719 Address addr = target_address(); 719 Address addr = target_address();
720 ASSERT(addr != NULL); 720 CHECK(addr != NULL);
721 // Check that we can find the right code object. 721 // Check that we can find the right code object.
722 Code* code = Code::GetCodeFromTargetAddress(addr); 722 Code* code = Code::GetCodeFromTargetAddress(addr);
723 Object* found = HEAP->FindCodeObject(addr); 723 Object* found = HEAP->FindCodeObject(addr);
724 ASSERT(found->IsCode()); 724 CHECK(found->IsCode());
725 ASSERT(code->address() == HeapObject::cast(found)->address()); 725 CHECK(code->address() == HeapObject::cast(found)->address());
726 break; 726 break;
727 } 727 }
728 case RUNTIME_ENTRY: 728 case RUNTIME_ENTRY:
729 case JS_RETURN: 729 case JS_RETURN:
730 case COMMENT: 730 case COMMENT:
731 case POSITION: 731 case POSITION:
732 case STATEMENT_POSITION: 732 case STATEMENT_POSITION:
733 case EXTERNAL_REFERENCE: 733 case EXTERNAL_REFERENCE:
734 case INTERNAL_REFERENCE: 734 case INTERNAL_REFERENCE:
735 case CONST_POOL: 735 case CONST_POOL:
736 case DEBUG_BREAK_SLOT: 736 case DEBUG_BREAK_SLOT:
737 case NONE: 737 case NONE:
738 break; 738 break;
739 case NUMBER_OF_MODES: 739 case NUMBER_OF_MODES:
740 UNREACHABLE(); 740 UNREACHABLE();
741 break; 741 break;
742 } 742 }
743 } 743 }
744 #endif // DEBUG 744 #endif // VERIFY_HEAP
745 745
746 746
747 // ----------------------------------------------------------------------------- 747 // -----------------------------------------------------------------------------
748 // Implementation of ExternalReference 748 // Implementation of ExternalReference
749 749
750 void ExternalReference::SetUp() { 750 void ExternalReference::SetUp() {
751 double_constants.min_int = kMinInt; 751 double_constants.min_int = kMinInt;
752 double_constants.one_half = 0.5; 752 double_constants.one_half = 0.5;
753 double_constants.minus_zero = -0.0; 753 double_constants.minus_zero = -0.0;
754 double_constants.uint8_max_value = 255; 754 double_constants.uint8_max_value = 255;
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
1366 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); 1366 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position);
1367 state_.written_position = state_.current_position; 1367 state_.written_position = state_.current_position;
1368 written = true; 1368 written = true;
1369 } 1369 }
1370 1370
1371 // Return whether something was written. 1371 // Return whether something was written.
1372 return written; 1372 return written;
1373 } 1373 }
1374 1374
1375 } } // namespace v8::internal 1375 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/assembler.h ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698