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

Side by Side Diff: src/objects.cc

Issue 2218002: The way reloc entries are visited by the ObjectVisitor is architecture... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 7 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/ia32/assembler-ia32-inl.h ('k') | src/serialize.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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 5153 matching lines...) Expand 10 before | Expand all | Expand 10 after
5164 5164
5165 5165
5166 void Code::CodeIterateBody(ObjectVisitor* v) { 5166 void Code::CodeIterateBody(ObjectVisitor* v) {
5167 int mode_mask = RelocInfo::kCodeTargetMask | 5167 int mode_mask = RelocInfo::kCodeTargetMask |
5168 RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT) | 5168 RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT) |
5169 RelocInfo::ModeMask(RelocInfo::EXTERNAL_REFERENCE) | 5169 RelocInfo::ModeMask(RelocInfo::EXTERNAL_REFERENCE) |
5170 RelocInfo::ModeMask(RelocInfo::JS_RETURN) | 5170 RelocInfo::ModeMask(RelocInfo::JS_RETURN) |
5171 RelocInfo::ModeMask(RelocInfo::RUNTIME_ENTRY); 5171 RelocInfo::ModeMask(RelocInfo::RUNTIME_ENTRY);
5172 5172
5173 for (RelocIterator it(this, mode_mask); !it.done(); it.next()) { 5173 for (RelocIterator it(this, mode_mask); !it.done(); it.next()) {
5174 RelocInfo::Mode rmode = it.rinfo()->rmode(); 5174 it.rinfo()->Visit(v);
5175 if (rmode == RelocInfo::EMBEDDED_OBJECT) {
5176 v->VisitPointer(it.rinfo()->target_object_address());
5177 } else if (RelocInfo::IsCodeTarget(rmode)) {
5178 v->VisitCodeTarget(it.rinfo());
5179 } else if (rmode == RelocInfo::EXTERNAL_REFERENCE) {
5180 v->VisitExternalReference(it.rinfo()->target_reference_address());
5181 #ifdef ENABLE_DEBUGGER_SUPPORT
5182 } else if (Debug::has_break_points() &&
5183 RelocInfo::IsJSReturn(rmode) &&
5184 it.rinfo()->IsPatchedReturnSequence()) {
5185 v->VisitDebugTarget(it.rinfo());
5186 #endif
5187 } else if (rmode == RelocInfo::RUNTIME_ENTRY) {
5188 v->VisitRuntimeEntry(it.rinfo());
5189 }
5190 } 5175 }
5191 5176
5192 ScopeInfo<>::IterateScopeInfo(this, v); 5177 ScopeInfo<>::IterateScopeInfo(this, v);
5193 } 5178 }
5194 5179
5195 5180
5196 void Code::Relocate(intptr_t delta) { 5181 void Code::Relocate(intptr_t delta) {
5197 for (RelocIterator it(this, RelocInfo::kApplyMask); !it.done(); it.next()) { 5182 for (RelocIterator it(this, RelocInfo::kApplyMask); !it.done(); it.next()) {
5198 it.rinfo()->apply(delta); 5183 it.rinfo()->apply(delta);
5199 } 5184 }
(...skipping 3349 matching lines...) Expand 10 before | Expand all | Expand 10 after
8549 if (break_point_objects()->IsUndefined()) return 0; 8534 if (break_point_objects()->IsUndefined()) return 0;
8550 // Single beak point. 8535 // Single beak point.
8551 if (!break_point_objects()->IsFixedArray()) return 1; 8536 if (!break_point_objects()->IsFixedArray()) return 1;
8552 // Multiple break points. 8537 // Multiple break points.
8553 return FixedArray::cast(break_point_objects())->length(); 8538 return FixedArray::cast(break_point_objects())->length();
8554 } 8539 }
8555 #endif 8540 #endif
8556 8541
8557 8542
8558 } } // namespace v8::internal 8543 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/assembler-ia32-inl.h ('k') | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698