| OLD | NEW |
| 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 // ----------------------------------------------------------------------------- | 186 // ----------------------------------------------------------------------------- |
| 187 // Implementation of Operand and MemOperand | 187 // Implementation of Operand and MemOperand |
| 188 // See assembler-ppc-inl.h for inlined constructors | 188 // See assembler-ppc-inl.h for inlined constructors |
| 189 | 189 |
| 190 Operand::Operand(Handle<Object> handle) { | 190 Operand::Operand(Handle<Object> handle) { |
| 191 AllowDeferredHandleDereference using_raw_address; | 191 AllowDeferredHandleDereference using_raw_address; |
| 192 rm_ = no_reg; | 192 rm_ = no_reg; |
| 193 // Verify all Objects referred by code are NOT in new space. | 193 // Verify all Objects referred by code are NOT in new space. |
| 194 Object* obj = *handle; | 194 Object* obj = *handle; |
| 195 if (obj->IsHeapObject()) { | 195 if (obj->IsHeapObject()) { |
| 196 DCHECK(!HeapObject::cast(obj)->GetHeap()->InNewSpace(obj)); | |
| 197 imm_ = reinterpret_cast<intptr_t>(handle.location()); | 196 imm_ = reinterpret_cast<intptr_t>(handle.location()); |
| 198 rmode_ = RelocInfo::EMBEDDED_OBJECT; | 197 rmode_ = RelocInfo::EMBEDDED_OBJECT; |
| 199 } else { | 198 } else { |
| 200 // no relocation needed | 199 // no relocation needed |
| 201 imm_ = reinterpret_cast<intptr_t>(obj); | 200 imm_ = reinterpret_cast<intptr_t>(obj); |
| 202 rmode_ = kRelocInfo_NONEPTR; | 201 rmode_ = kRelocInfo_NONEPTR; |
| 203 } | 202 } |
| 204 } | 203 } |
| 205 | 204 |
| 206 | 205 |
| (...skipping 2298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2505 | 2504 |
| 2506 trampoline_ = Trampoline(pc_offset() - size, tracked_branch_count_); | 2505 trampoline_ = Trampoline(pc_offset() - size, tracked_branch_count_); |
| 2507 } | 2506 } |
| 2508 } | 2507 } |
| 2509 | 2508 |
| 2510 | 2509 |
| 2511 } // namespace internal | 2510 } // namespace internal |
| 2512 } // namespace v8 | 2511 } // namespace v8 |
| 2513 | 2512 |
| 2514 #endif // V8_TARGET_ARCH_PPC | 2513 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |