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

Side by Side Diff: src/assembler.cc

Issue 12314012: Ensure deopt entries have no relocation information. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Ported to MIPS. Created 7 years, 10 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/deoptimizer.cc » ('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 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 code_age_sequence_ = NULL; 682 code_age_sequence_ = NULL;
683 if (mode_mask_ == 0) pos_ = end_; 683 if (mode_mask_ == 0) pos_ = end_;
684 next(); 684 next();
685 } 685 }
686 686
687 687
688 // ----------------------------------------------------------------------------- 688 // -----------------------------------------------------------------------------
689 // Implementation of RelocInfo 689 // Implementation of RelocInfo
690 690
691 691
692 #ifdef DEBUG
693 bool RelocInfo::RequiresRelocation(const CodeDesc& desc) {
694 // Ensure there are no code targets or embedded objects present in the
695 // deoptimization entries, they would require relocation after code
696 // generation.
697 int mode_mask = RelocInfo::kCodeTargetMask |
698 RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT) |
699 RelocInfo::ModeMask(RelocInfo::GLOBAL_PROPERTY_CELL) |
700 RelocInfo::kApplyMask;
701 RelocIterator it(desc, mode_mask);
702 return !it.done();
703 }
704 #endif
705
706
692 #ifdef ENABLE_DISASSEMBLER 707 #ifdef ENABLE_DISASSEMBLER
693 const char* RelocInfo::RelocModeName(RelocInfo::Mode rmode) { 708 const char* RelocInfo::RelocModeName(RelocInfo::Mode rmode) {
694 switch (rmode) { 709 switch (rmode) {
695 case RelocInfo::NONE32: 710 case RelocInfo::NONE32:
696 return "no reloc 32"; 711 return "no reloc 32";
697 case RelocInfo::NONE64: 712 case RelocInfo::NONE64:
698 return "no reloc 64"; 713 return "no reloc 64";
699 case RelocInfo::EMBEDDED_OBJECT: 714 case RelocInfo::EMBEDDED_OBJECT:
700 return "embedded object"; 715 return "embedded object";
701 case RelocInfo::CONSTRUCT_CALL: 716 case RelocInfo::CONSTRUCT_CALL:
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after
1567 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); 1582 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position);
1568 state_.written_position = state_.current_position; 1583 state_.written_position = state_.current_position;
1569 written = true; 1584 written = true;
1570 } 1585 }
1571 1586
1572 // Return whether something was written. 1587 // Return whether something was written.
1573 return written; 1588 return written;
1574 } 1589 }
1575 1590
1576 } } // namespace v8::internal 1591 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/assembler.h ('k') | src/deoptimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698