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 are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // 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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 // ----------------------------------------------------------------------------- | 218 // ----------------------------------------------------------------------------- |
219 // Implementation of Operand and MemOperand. | 219 // Implementation of Operand and MemOperand. |
220 // See assembler-mips-inl.h for inlined constructors. | 220 // See assembler-mips-inl.h for inlined constructors. |
221 | 221 |
222 Operand::Operand(Handle<Object> handle) { | 222 Operand::Operand(Handle<Object> handle) { |
223 AllowDeferredHandleDereference using_raw_address; | 223 AllowDeferredHandleDereference using_raw_address; |
224 rm_ = no_reg; | 224 rm_ = no_reg; |
225 // Verify all Objects referred by code are NOT in new space. | 225 // Verify all Objects referred by code are NOT in new space. |
226 Object* obj = *handle; | 226 Object* obj = *handle; |
227 if (obj->IsHeapObject()) { | 227 if (obj->IsHeapObject()) { |
228 DCHECK(!HeapObject::cast(obj)->GetHeap()->InNewSpace(obj)); | |
229 imm32_ = reinterpret_cast<intptr_t>(handle.location()); | 228 imm32_ = reinterpret_cast<intptr_t>(handle.location()); |
230 rmode_ = RelocInfo::EMBEDDED_OBJECT; | 229 rmode_ = RelocInfo::EMBEDDED_OBJECT; |
231 } else { | 230 } else { |
232 // No relocation needed. | 231 // No relocation needed. |
233 imm32_ = reinterpret_cast<intptr_t>(obj); | 232 imm32_ = reinterpret_cast<intptr_t>(obj); |
234 rmode_ = RelocInfo::NONE32; | 233 rmode_ = RelocInfo::NONE32; |
235 } | 234 } |
236 } | 235 } |
237 | 236 |
238 | 237 |
(...skipping 2938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3177 | 3176 |
3178 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { | 3177 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { |
3179 Assembler::FlushICache(isolate, pc, 2 * sizeof(int32_t)); | 3178 Assembler::FlushICache(isolate, pc, 2 * sizeof(int32_t)); |
3180 } | 3179 } |
3181 } | 3180 } |
3182 | 3181 |
3183 } // namespace internal | 3182 } // namespace internal |
3184 } // namespace v8 | 3183 } // namespace v8 |
3185 | 3184 |
3186 #endif // V8_TARGET_ARCH_MIPS | 3185 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |