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

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

Issue 12213080: Use EXTERNAL_REFERENCE instead of RUNTIME_ENTRY for deoptimization entries for ARM and MIPS (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: 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 | « no previous file | src/arm/lithium-codegen-arm.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 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_) || rmode_ == EXTERNAL_REFERENCE);
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_) || rmode_ == EMBEDDED_OBJECT
117 || rmode_ == EMBEDDED_OBJECT
118 || rmode_ == EXTERNAL_REFERENCE); 117 || rmode_ == EXTERNAL_REFERENCE);
119 return reinterpret_cast<Address>(Assembler::target_pointer_address_at(pc_)); 118 return reinterpret_cast<Address>(Assembler::target_pointer_address_at(pc_));
120 } 119 }
121 120
122 121
123 int RelocInfo::target_address_size() { 122 int RelocInfo::target_address_size() {
124 return kPointerSize; 123 return kPointerSize;
125 } 124 }
126 125
127 126
128 void RelocInfo::set_target_address(Address target, WriteBarrierMode mode) { 127 void RelocInfo::set_target_address(Address target, WriteBarrierMode mode) {
129 ASSERT(IsCodeTarget(rmode_) || rmode_ == RUNTIME_ENTRY); 128 ASSERT(IsCodeTarget(rmode_) || rmode_ == EXTERNAL_REFERENCE);
130 Assembler::set_target_address_at(pc_, target); 129 Assembler::set_target_address_at(pc_, target);
131 if (mode == UPDATE_WRITE_BARRIER && host() != NULL && IsCodeTarget(rmode_)) { 130 if (mode == UPDATE_WRITE_BARRIER && host() != NULL && IsCodeTarget(rmode_)) {
132 Object* target_code = Code::GetCodeFromTargetAddress(target); 131 Object* target_code = Code::GetCodeFromTargetAddress(target);
133 host()->GetHeap()->incremental_marking()->RecordWriteIntoCode( 132 host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(
134 host(), this, HeapObject::cast(target_code)); 133 host(), this, HeapObject::cast(target_code));
135 } 134 }
136 } 135 }
137 136
138 137
139 Object* RelocInfo::target_object() { 138 Object* RelocInfo::target_object() {
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 #ifdef ENABLE_DEBUGGER_SUPPORT 301 #ifdef ENABLE_DEBUGGER_SUPPORT
303 // TODO(isolates): Get a cached isolate below. 302 // TODO(isolates): Get a cached isolate below.
304 } else if (((RelocInfo::IsJSReturn(mode) && 303 } else if (((RelocInfo::IsJSReturn(mode) &&
305 IsPatchedReturnSequence()) || 304 IsPatchedReturnSequence()) ||
306 (RelocInfo::IsDebugBreakSlot(mode) && 305 (RelocInfo::IsDebugBreakSlot(mode) &&
307 IsPatchedDebugBreakSlotSequence())) && 306 IsPatchedDebugBreakSlotSequence())) &&
308 Isolate::Current()->debug()->has_break_points()) { 307 Isolate::Current()->debug()->has_break_points()) {
309 visitor->VisitDebugTarget(this); 308 visitor->VisitDebugTarget(this);
310 #endif 309 #endif
311 } else if (mode == RelocInfo::RUNTIME_ENTRY) { 310 } else if (mode == RelocInfo::RUNTIME_ENTRY) {
311 UNREACHABLE();
312 visitor->VisitRuntimeEntry(this); 312 visitor->VisitRuntimeEntry(this);
313 } 313 }
314 } 314 }
315 315
316 316
317 template<typename StaticVisitor> 317 template<typename StaticVisitor>
318 void RelocInfo::Visit(Heap* heap) { 318 void RelocInfo::Visit(Heap* heap) {
319 RelocInfo::Mode mode = rmode(); 319 RelocInfo::Mode mode = rmode();
320 if (mode == RelocInfo::EMBEDDED_OBJECT) { 320 if (mode == RelocInfo::EMBEDDED_OBJECT) {
321 StaticVisitor::VisitEmbeddedPointer(heap, this); 321 StaticVisitor::VisitEmbeddedPointer(heap, this);
322 } else if (RelocInfo::IsCodeTarget(mode)) { 322 } else if (RelocInfo::IsCodeTarget(mode)) {
323 StaticVisitor::VisitCodeTarget(heap, this); 323 StaticVisitor::VisitCodeTarget(heap, this);
324 } else if (mode == RelocInfo::GLOBAL_PROPERTY_CELL) { 324 } else if (mode == RelocInfo::GLOBAL_PROPERTY_CELL) {
325 StaticVisitor::VisitGlobalPropertyCell(heap, this); 325 StaticVisitor::VisitGlobalPropertyCell(heap, this);
326 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { 326 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) {
327 StaticVisitor::VisitExternalReference(this); 327 StaticVisitor::VisitExternalReference(this);
328 } else if (RelocInfo::IsCodeAgeSequence(mode)) { 328 } else if (RelocInfo::IsCodeAgeSequence(mode)) {
329 StaticVisitor::VisitCodeAgeSequence(heap, this); 329 StaticVisitor::VisitCodeAgeSequence(heap, this);
330 #ifdef ENABLE_DEBUGGER_SUPPORT 330 #ifdef ENABLE_DEBUGGER_SUPPORT
331 } else if (heap->isolate()->debug()->has_break_points() && 331 } else if (heap->isolate()->debug()->has_break_points() &&
332 ((RelocInfo::IsJSReturn(mode) && 332 ((RelocInfo::IsJSReturn(mode) &&
333 IsPatchedReturnSequence()) || 333 IsPatchedReturnSequence()) ||
334 (RelocInfo::IsDebugBreakSlot(mode) && 334 (RelocInfo::IsDebugBreakSlot(mode) &&
335 IsPatchedDebugBreakSlotSequence()))) { 335 IsPatchedDebugBreakSlotSequence()))) {
336 StaticVisitor::VisitDebugTarget(heap, this); 336 StaticVisitor::VisitDebugTarget(heap, this);
337 #endif 337 #endif
338 } else if (mode == RelocInfo::RUNTIME_ENTRY) { 338 } else if (mode == RelocInfo::RUNTIME_ENTRY) {
339 UNREACHABLE();
339 StaticVisitor::VisitRuntimeEntry(this); 340 StaticVisitor::VisitRuntimeEntry(this);
340 } 341 }
341 } 342 }
342 343
343 344
344 Operand::Operand(int32_t immediate, RelocInfo::Mode rmode) { 345 Operand::Operand(int32_t immediate, RelocInfo::Mode rmode) {
345 rm_ = no_reg; 346 rm_ = no_reg;
346 imm32_ = immediate; 347 imm32_ = immediate;
347 rmode_ = rmode; 348 rmode_ = rmode;
348 } 349 }
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 541
541 542
542 void Assembler::set_target_address_at(Address pc, Address target) { 543 void Assembler::set_target_address_at(Address pc, Address target) {
543 set_target_pointer_at(pc, target); 544 set_target_pointer_at(pc, target);
544 } 545 }
545 546
546 547
547 } } // namespace v8::internal 548 } } // namespace v8::internal
548 549
549 #endif // V8_ARM_ASSEMBLER_ARM_INL_H_ 550 #endif // V8_ARM_ASSEMBLER_ARM_INL_H_
OLDNEW
« no previous file with comments | « no previous file | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698