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

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

Issue 14403015: Disallow dereferencing deferred handles when generating optimized code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments 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/arm/lithium-arm.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 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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 // Patch the code at the current address with a call to the target. 298 // Patch the code at the current address with a call to the target.
299 UNIMPLEMENTED(); 299 UNIMPLEMENTED();
300 } 300 }
301 301
302 302
303 // ----------------------------------------------------------------------------- 303 // -----------------------------------------------------------------------------
304 // Implementation of Operand and MemOperand 304 // Implementation of Operand and MemOperand
305 // See assembler-arm-inl.h for inlined constructors 305 // See assembler-arm-inl.h for inlined constructors
306 306
307 Operand::Operand(Handle<Object> handle) { 307 Operand::Operand(Handle<Object> handle) {
308 #ifdef DEBUG
309 Isolate* isolate = Isolate::Current();
310 #endif
311 ALLOW_HANDLE_DEREF(isolate, "using and embedding raw address");
308 rm_ = no_reg; 312 rm_ = no_reg;
309 // Verify all Objects referred by code are NOT in new space. 313 // Verify all Objects referred by code are NOT in new space.
310 Object* obj = *handle; 314 Object* obj = *handle;
311 ASSERT(!HEAP->InNewSpace(obj)); 315 ASSERT(!isolate->heap()->InNewSpace(obj));
312 if (obj->IsHeapObject()) { 316 if (obj->IsHeapObject()) {
313 imm32_ = reinterpret_cast<intptr_t>(handle.location()); 317 imm32_ = reinterpret_cast<intptr_t>(handle.location());
314 rmode_ = RelocInfo::EMBEDDED_OBJECT; 318 rmode_ = RelocInfo::EMBEDDED_OBJECT;
315 } else { 319 } else {
316 // no relocation needed 320 // no relocation needed
317 imm32_ = reinterpret_cast<intptr_t>(obj); 321 imm32_ = reinterpret_cast<intptr_t>(obj);
318 rmode_ = RelocInfo::NONE32; 322 rmode_ = RelocInfo::NONE32;
319 } 323 }
320 } 324 }
321 325
322 326
323 Operand::Operand(Register rm, ShiftOp shift_op, int shift_imm) { 327 Operand::Operand(Register rm, ShiftOp shift_op, int shift_imm) {
324 ASSERT(is_uint5(shift_imm)); 328 ASSERT(is_uint5(shift_imm));
325 ASSERT(shift_op != ROR || shift_imm != 0); // use RRX if you mean it 329 ASSERT(shift_op != ROR || shift_imm != 0); // use RRX if you mean it
326 rm_ = rm; 330 rm_ = rm;
327 rs_ = no_reg; 331 rs_ = no_reg;
(...skipping 2751 matching lines...) Expand 10 before | Expand all | Expand 10 after
3079 3083
3080 // Since a constant pool was just emitted, move the check offset forward by 3084 // Since a constant pool was just emitted, move the check offset forward by
3081 // the standard interval. 3085 // the standard interval.
3082 next_buffer_check_ = pc_offset() + kCheckPoolInterval; 3086 next_buffer_check_ = pc_offset() + kCheckPoolInterval;
3083 } 3087 }
3084 3088
3085 3089
3086 } } // namespace v8::internal 3090 } } // namespace v8::internal
3087 3091
3088 #endif // V8_TARGET_ARCH_ARM 3092 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/lithium-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698