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

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

Issue 12702005: Use IsRuntimeEntry for RUNTIME_ENTRY comparison (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 years, 9 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 | « no previous file | 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 // absolute code pointer inside code object moves with the code object. 100 // absolute code pointer inside code object moves with the code object.
101 int32_t* p = reinterpret_cast<int32_t*>(pc_); 101 int32_t* p = reinterpret_cast<int32_t*>(pc_);
102 *p += delta; // relocate entry 102 *p += delta; // relocate entry
103 } 103 }
104 // We do not use pc relative addressing on ARM, so there is 104 // We do not use pc relative addressing on ARM, so there is
105 // nothing else to do. 105 // nothing else to do.
106 } 106 }
107 107
108 108
109 Address RelocInfo::target_address() { 109 Address RelocInfo::target_address() {
110 ASSERT(IsCodeTarget(rmode_) || rmode_ == RUNTIME_ENTRY); 110 ASSERT(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_));
111 return Assembler::target_address_at(pc_); 111 return Assembler::target_address_at(pc_);
112 } 112 }
113 113
114 114
115 Address RelocInfo::target_address_address() { 115 Address RelocInfo::target_address_address() {
116 ASSERT(IsCodeTarget(rmode_) || rmode_ == RUNTIME_ENTRY 116 ASSERT(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)
117 || rmode_ == EMBEDDED_OBJECT 117 || rmode_ == EMBEDDED_OBJECT
118 || rmode_ == EXTERNAL_REFERENCE); 118 || rmode_ == EXTERNAL_REFERENCE);
119 return reinterpret_cast<Address>(Assembler::target_pointer_address_at(pc_)); 119 return reinterpret_cast<Address>(Assembler::target_pointer_address_at(pc_));
120 } 120 }
121 121
122 122
123 int RelocInfo::target_address_size() { 123 int RelocInfo::target_address_size() {
124 return kPointerSize; 124 return kPointerSize;
125 } 125 }
126 126
127 127
128 void RelocInfo::set_target_address(Address target, WriteBarrierMode mode) { 128 void RelocInfo::set_target_address(Address target, WriteBarrierMode mode) {
129 ASSERT(IsCodeTarget(rmode_) || rmode_ == RUNTIME_ENTRY); 129 ASSERT(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_));
130 Assembler::set_target_address_at(pc_, target); 130 Assembler::set_target_address_at(pc_, target);
131 if (mode == UPDATE_WRITE_BARRIER && host() != NULL && IsCodeTarget(rmode_)) { 131 if (mode == UPDATE_WRITE_BARRIER && host() != NULL && IsCodeTarget(rmode_)) {
132 Object* target_code = Code::GetCodeFromTargetAddress(target); 132 Object* target_code = Code::GetCodeFromTargetAddress(target);
133 host()->GetHeap()->incremental_marking()->RecordWriteIntoCode( 133 host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(
134 host(), this, HeapObject::cast(target_code)); 134 host(), this, HeapObject::cast(target_code));
135 } 135 }
136 } 136 }
137 137
138 138
139 Object* RelocInfo::target_object() { 139 Object* RelocInfo::target_object() {
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 visitor->VisitCodeAgeSequence(this); 314 visitor->VisitCodeAgeSequence(this);
315 #ifdef ENABLE_DEBUGGER_SUPPORT 315 #ifdef ENABLE_DEBUGGER_SUPPORT
316 // TODO(isolates): Get a cached isolate below. 316 // TODO(isolates): Get a cached isolate below.
317 } else if (((RelocInfo::IsJSReturn(mode) && 317 } else if (((RelocInfo::IsJSReturn(mode) &&
318 IsPatchedReturnSequence()) || 318 IsPatchedReturnSequence()) ||
319 (RelocInfo::IsDebugBreakSlot(mode) && 319 (RelocInfo::IsDebugBreakSlot(mode) &&
320 IsPatchedDebugBreakSlotSequence())) && 320 IsPatchedDebugBreakSlotSequence())) &&
321 Isolate::Current()->debug()->has_break_points()) { 321 Isolate::Current()->debug()->has_break_points()) {
322 visitor->VisitDebugTarget(this); 322 visitor->VisitDebugTarget(this);
323 #endif 323 #endif
324 } else if (mode == RelocInfo::RUNTIME_ENTRY) { 324 } else if (RelocInfo::IsRuntimeEntry(mode)) {
325 visitor->VisitRuntimeEntry(this); 325 visitor->VisitRuntimeEntry(this);
326 } 326 }
327 } 327 }
328 328
329 329
330 template<typename StaticVisitor> 330 template<typename StaticVisitor>
331 void RelocInfo::Visit(Heap* heap) { 331 void RelocInfo::Visit(Heap* heap) {
332 RelocInfo::Mode mode = rmode(); 332 RelocInfo::Mode mode = rmode();
333 if (mode == RelocInfo::EMBEDDED_OBJECT) { 333 if (mode == RelocInfo::EMBEDDED_OBJECT) {
334 StaticVisitor::VisitEmbeddedPointer(heap, this); 334 StaticVisitor::VisitEmbeddedPointer(heap, this);
335 } else if (RelocInfo::IsCodeTarget(mode)) { 335 } else if (RelocInfo::IsCodeTarget(mode)) {
336 StaticVisitor::VisitCodeTarget(heap, this); 336 StaticVisitor::VisitCodeTarget(heap, this);
337 } else if (mode == RelocInfo::GLOBAL_PROPERTY_CELL) { 337 } else if (mode == RelocInfo::GLOBAL_PROPERTY_CELL) {
338 StaticVisitor::VisitGlobalPropertyCell(heap, this); 338 StaticVisitor::VisitGlobalPropertyCell(heap, this);
339 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { 339 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) {
340 StaticVisitor::VisitExternalReference(this); 340 StaticVisitor::VisitExternalReference(this);
341 } else if (RelocInfo::IsCodeAgeSequence(mode)) { 341 } else if (RelocInfo::IsCodeAgeSequence(mode)) {
342 StaticVisitor::VisitCodeAgeSequence(heap, this); 342 StaticVisitor::VisitCodeAgeSequence(heap, this);
343 #ifdef ENABLE_DEBUGGER_SUPPORT 343 #ifdef ENABLE_DEBUGGER_SUPPORT
344 } else if (heap->isolate()->debug()->has_break_points() && 344 } else if (heap->isolate()->debug()->has_break_points() &&
345 ((RelocInfo::IsJSReturn(mode) && 345 ((RelocInfo::IsJSReturn(mode) &&
346 IsPatchedReturnSequence()) || 346 IsPatchedReturnSequence()) ||
347 (RelocInfo::IsDebugBreakSlot(mode) && 347 (RelocInfo::IsDebugBreakSlot(mode) &&
348 IsPatchedDebugBreakSlotSequence()))) { 348 IsPatchedDebugBreakSlotSequence()))) {
349 StaticVisitor::VisitDebugTarget(heap, this); 349 StaticVisitor::VisitDebugTarget(heap, this);
350 #endif 350 #endif
351 } else if (mode == RelocInfo::RUNTIME_ENTRY) { 351 } else if (RelocInfo::IsRuntimeEntry(mode)) {
352 StaticVisitor::VisitRuntimeEntry(this); 352 StaticVisitor::VisitRuntimeEntry(this);
353 } 353 }
354 } 354 }
355 355
356 356
357 Operand::Operand(int32_t immediate, RelocInfo::Mode rmode) { 357 Operand::Operand(int32_t immediate, RelocInfo::Mode rmode) {
358 rm_ = no_reg; 358 rm_ = no_reg;
359 imm32_ = immediate; 359 imm32_ = immediate;
360 rmode_ = rmode; 360 rmode_ = rmode;
361 } 361 }
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 553
554 554
555 void Assembler::set_target_address_at(Address pc, Address target) { 555 void Assembler::set_target_address_at(Address pc, Address target) {
556 set_target_pointer_at(pc, target); 556 set_target_pointer_at(pc, target);
557 } 557 }
558 558
559 559
560 } } // namespace v8::internal 560 } } // namespace v8::internal
561 561
562 #endif // V8_ARM_ASSEMBLER_ARM_INL_H_ 562 #endif // V8_ARM_ASSEMBLER_ARM_INL_H_
OLDNEW
« no previous file with comments | « no previous file | src/assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698