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

Side by Side Diff: src/mips/assembler-mips.cc

Issue 14305011: MIPS: Disallow dereferencing deferred handles when generating optimized code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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/mips/lithium-codegen-mips.h » ('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 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
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
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
OLDNEW
« no previous file with comments | « no previous file | src/mips/lithium-codegen-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698