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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 // Patch the code at the current address with a call to the target. | 230 // Patch the code at the current address with a call to the target. |
231 UNIMPLEMENTED_MIPS(); | 231 UNIMPLEMENTED_MIPS(); |
232 } | 232 } |
233 | 233 |
234 | 234 |
235 // ----------------------------------------------------------------------------- | 235 // ----------------------------------------------------------------------------- |
236 // Implementation of Operand and MemOperand. | 236 // Implementation of Operand and MemOperand. |
237 // See assembler-mips-inl.h for inlined constructors. | 237 // See assembler-mips-inl.h for inlined constructors. |
238 | 238 |
239 Operand::Operand(Handle<Object> handle) { | 239 Operand::Operand(Handle<Object> handle) { |
| 240 #ifdef DEBUG |
| 241 Isolate* isolate = Isolate::Current(); |
| 242 #endif |
| 243 ALLOW_HANDLE_DEREF(isolate, "using and embedding raw address"); |
240 rm_ = no_reg; | 244 rm_ = no_reg; |
241 // Verify all Objects referred by code are NOT in new space. | 245 // Verify all Objects referred by code are NOT in new space. |
242 Object* obj = *handle; | 246 Object* obj = *handle; |
243 ASSERT(!HEAP->InNewSpace(obj)); | 247 ASSERT(!isolate->heap()->InNewSpace(obj)); |
244 if (obj->IsHeapObject()) { | 248 if (obj->IsHeapObject()) { |
245 imm32_ = reinterpret_cast<intptr_t>(handle.location()); | 249 imm32_ = reinterpret_cast<intptr_t>(handle.location()); |
246 rmode_ = RelocInfo::EMBEDDED_OBJECT; | 250 rmode_ = RelocInfo::EMBEDDED_OBJECT; |
247 } else { | 251 } else { |
248 // No relocation needed. | 252 // No relocation needed. |
249 imm32_ = reinterpret_cast<intptr_t>(obj); | 253 imm32_ = reinterpret_cast<intptr_t>(obj); |
250 rmode_ = RelocInfo::NONE32; | 254 rmode_ = RelocInfo::NONE32; |
251 } | 255 } |
252 } | 256 } |
253 | 257 |
(...skipping 2028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2282 } | 2286 } |
2283 | 2287 |
2284 if (patched) { | 2288 if (patched) { |
2285 CPU::FlushICache(pc+2, sizeof(Address)); | 2289 CPU::FlushICache(pc+2, sizeof(Address)); |
2286 } | 2290 } |
2287 } | 2291 } |
2288 | 2292 |
2289 } } // namespace v8::internal | 2293 } } // namespace v8::internal |
2290 | 2294 |
2291 #endif // V8_TARGET_ARCH_MIPS | 2295 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |