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

Side by Side Diff: src/arm/assembler-arm-inl.h

Issue 3066044: Generalize virtually dispatched scavenger to virtually dispatched specialized visitors. (Closed)
Patch Set: cleanup Created 10 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
« no previous file with comments | « src/SConscript ('k') | src/assembler.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 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 (RelocInfo::IsDebugBreakSlot(mode) && 183 (RelocInfo::IsDebugBreakSlot(mode) &&
184 IsPatchedDebugBreakSlotSequence()))) { 184 IsPatchedDebugBreakSlotSequence()))) {
185 visitor->VisitDebugTarget(this); 185 visitor->VisitDebugTarget(this);
186 #endif 186 #endif
187 } else if (mode == RelocInfo::RUNTIME_ENTRY) { 187 } else if (mode == RelocInfo::RUNTIME_ENTRY) {
188 visitor->VisitRuntimeEntry(this); 188 visitor->VisitRuntimeEntry(this);
189 } 189 }
190 } 190 }
191 191
192 192
193 template<typename StaticVisitor>
194 void RelocInfo::Visit() {
195 RelocInfo::Mode mode = rmode();
196 if (mode == RelocInfo::EMBEDDED_OBJECT) {
197 StaticVisitor::VisitPointer(target_object_address());
198 } else if (RelocInfo::IsCodeTarget(mode)) {
199 StaticVisitor::VisitCodeTarget(this);
200 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) {
201 StaticVisitor::VisitExternalReference(target_reference_address());
202 #ifdef ENABLE_DEBUGGER_SUPPORT
203 } else if (Debug::has_break_points() &&
204 ((RelocInfo::IsJSReturn(mode) &&
205 IsPatchedReturnSequence()) ||
206 (RelocInfo::IsDebugBreakSlot(mode) &&
207 IsPatchedDebugBreakSlotSequence()))) {
208 StaticVisitor::VisitDebugTarget(this);
209 #endif
210 } else if (mode == RelocInfo::RUNTIME_ENTRY) {
211 StaticVisitor::VisitRuntimeEntry(this);
212 }
213 }
214
215
193 Operand::Operand(int32_t immediate, RelocInfo::Mode rmode) { 216 Operand::Operand(int32_t immediate, RelocInfo::Mode rmode) {
194 rm_ = no_reg; 217 rm_ = no_reg;
195 imm32_ = immediate; 218 imm32_ = immediate;
196 rmode_ = rmode; 219 rmode_ = rmode;
197 } 220 }
198 221
199 222
200 Operand::Operand(const ExternalReference& f) { 223 Operand::Operand(const ExternalReference& f) {
201 rm_ = no_reg; 224 rm_ = no_reg;
202 imm32_ = reinterpret_cast<int32_t>(f.address()); 225 imm32_ = reinterpret_cast<int32_t>(f.address());
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 // CPU::FlushICache(pc, sizeof(target)); 317 // CPU::FlushICache(pc, sizeof(target));
295 // However, on ARM, no instruction was actually patched by the assignment 318 // However, on ARM, no instruction was actually patched by the assignment
296 // above; the target address is not part of an instruction, it is patched in 319 // above; the target address is not part of an instruction, it is patched in
297 // the constant pool and is read via a data access; the instruction accessing 320 // the constant pool and is read via a data access; the instruction accessing
298 // this address in the constant pool remains unchanged. 321 // this address in the constant pool remains unchanged.
299 } 322 }
300 323
301 } } // namespace v8::internal 324 } } // namespace v8::internal
302 325
303 #endif // V8_ARM_ASSEMBLER_ARM_INL_H_ 326 #endif // V8_ARM_ASSEMBLER_ARM_INL_H_
OLDNEW
« no previous file with comments | « src/SConscript ('k') | src/assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698