| OLD | NEW |
| 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 830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 841 RelocInfo::ModeMask(RelocInfo::RUNTIME_ENTRY); | 841 RelocInfo::ModeMask(RelocInfo::RUNTIME_ENTRY); |
| 842 | 842 |
| 843 // There are two places where we iterate code bodies: here and the | 843 // There are two places where we iterate code bodies: here and the |
| 844 // templated CodeIterateBody (below). They should be kept in sync. | 844 // templated CodeIterateBody (below). They should be kept in sync. |
| 845 IteratePointer(v, kRelocationInfoOffset); | 845 IteratePointer(v, kRelocationInfoOffset); |
| 846 IteratePointer(v, kHandlerTableOffset); | 846 IteratePointer(v, kHandlerTableOffset); |
| 847 IteratePointer(v, kDeoptimizationDataOffset); | 847 IteratePointer(v, kDeoptimizationDataOffset); |
| 848 IteratePointer(v, kTypeFeedbackInfoOffset); | 848 IteratePointer(v, kTypeFeedbackInfoOffset); |
| 849 | 849 |
| 850 RelocIterator it(this, mode_mask); | 850 RelocIterator it(this, mode_mask); |
| 851 Isolate* isolate = this->GetIsolate(); |
| 851 for (; !it.done(); it.next()) { | 852 for (; !it.done(); it.next()) { |
| 852 it.rinfo()->Visit(v); | 853 it.rinfo()->Visit(isolate, v); |
| 853 } | 854 } |
| 854 } | 855 } |
| 855 | 856 |
| 856 | 857 |
| 857 template<typename StaticVisitor> | 858 template<typename StaticVisitor> |
| 858 void Code::CodeIterateBody(Heap* heap) { | 859 void Code::CodeIterateBody(Heap* heap) { |
| 859 int mode_mask = RelocInfo::kCodeTargetMask | | 860 int mode_mask = RelocInfo::kCodeTargetMask | |
| 860 RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT) | | 861 RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT) | |
| 861 RelocInfo::ModeMask(RelocInfo::CELL) | | 862 RelocInfo::ModeMask(RelocInfo::CELL) | |
| 862 RelocInfo::ModeMask(RelocInfo::EXTERNAL_REFERENCE) | | 863 RelocInfo::ModeMask(RelocInfo::EXTERNAL_REFERENCE) | |
| (...skipping 19 matching lines...) Expand all Loading... |
| 882 RelocIterator it(this, mode_mask); | 883 RelocIterator it(this, mode_mask); |
| 883 for (; !it.done(); it.next()) { | 884 for (; !it.done(); it.next()) { |
| 884 it.rinfo()->template Visit<StaticVisitor>(heap); | 885 it.rinfo()->template Visit<StaticVisitor>(heap); |
| 885 } | 886 } |
| 886 } | 887 } |
| 887 | 888 |
| 888 | 889 |
| 889 } } // namespace v8::internal | 890 } } // namespace v8::internal |
| 890 | 891 |
| 891 #endif // V8_OBJECTS_VISITING_INL_H_ | 892 #endif // V8_OBJECTS_VISITING_INL_H_ |
| OLD | NEW |