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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 // ----------------------------------------------------------------------------- | 268 // ----------------------------------------------------------------------------- |
269 // Implementation of Operand and MemOperand | 269 // Implementation of Operand and MemOperand |
270 // See assembler-arm-inl.h for inlined constructors | 270 // See assembler-arm-inl.h for inlined constructors |
271 | 271 |
272 Operand::Operand(Handle<Object> handle) { | 272 Operand::Operand(Handle<Object> handle) { |
273 AllowDeferredHandleDereference using_raw_address; | 273 AllowDeferredHandleDereference using_raw_address; |
274 rm_ = no_reg; | 274 rm_ = no_reg; |
275 // Verify all Objects referred by code are NOT in new space. | 275 // Verify all Objects referred by code are NOT in new space. |
276 Object* obj = *handle; | 276 Object* obj = *handle; |
277 if (obj->IsHeapObject()) { | 277 if (obj->IsHeapObject()) { |
278 DCHECK(!HeapObject::cast(obj)->GetHeap()->InNewSpace(obj)); | |
279 imm32_ = reinterpret_cast<intptr_t>(handle.location()); | 278 imm32_ = reinterpret_cast<intptr_t>(handle.location()); |
280 rmode_ = RelocInfo::EMBEDDED_OBJECT; | 279 rmode_ = RelocInfo::EMBEDDED_OBJECT; |
281 } else { | 280 } else { |
282 // no relocation needed | 281 // no relocation needed |
283 imm32_ = reinterpret_cast<intptr_t>(obj); | 282 imm32_ = reinterpret_cast<intptr_t>(obj); |
284 rmode_ = RelocInfo::NONE32; | 283 rmode_ = RelocInfo::NONE32; |
285 } | 284 } |
286 } | 285 } |
287 | 286 |
288 | 287 |
(...skipping 3967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4256 DCHECK(is_uint12(offset)); | 4255 DCHECK(is_uint12(offset)); |
4257 instr_at_put(pc, SetLdrRegisterImmediateOffset(instr, offset)); | 4256 instr_at_put(pc, SetLdrRegisterImmediateOffset(instr, offset)); |
4258 } | 4257 } |
4259 } | 4258 } |
4260 | 4259 |
4261 | 4260 |
4262 } // namespace internal | 4261 } // namespace internal |
4263 } // namespace v8 | 4262 } // namespace v8 |
4264 | 4263 |
4265 #endif // V8_TARGET_ARCH_ARM | 4264 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |