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

Side by Side Diff: src/ia32/macro-assembler-ia32.cc

Issue 15779004: Fix embedded new-space pointer in LCmpObjectEqAndBranch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2486 matching lines...) Expand 10 before | Expand all | Expand 10 after
2497 if (isolate()->heap()->InNewSpace(*object)) { 2497 if (isolate()->heap()->InNewSpace(*object)) {
2498 Handle<JSGlobalPropertyCell> cell = 2498 Handle<JSGlobalPropertyCell> cell =
2499 isolate()->factory()->NewJSGlobalPropertyCell(object); 2499 isolate()->factory()->NewJSGlobalPropertyCell(object);
2500 mov(result, Operand::Cell(cell)); 2500 mov(result, Operand::Cell(cell));
2501 } else { 2501 } else {
2502 mov(result, object); 2502 mov(result, object);
2503 } 2503 }
2504 } 2504 }
2505 2505
2506 2506
2507 void MacroAssembler::CmpHeapObject(Register reg, Handle<HeapObject> object) {
2508 ALLOW_HANDLE_DEREF(isolate(), "using raw address");
2509 if (isolate()->heap()->InNewSpace(*object)) {
2510 Handle<JSGlobalPropertyCell> cell =
2511 isolate()->factory()->NewJSGlobalPropertyCell(object);
2512 cmp(reg, Operand::Cell(cell));
2513 } else {
2514 cmp(reg, object);
2515 }
2516 }
2517
2518
2507 void MacroAssembler::PushHeapObject(Handle<HeapObject> object) { 2519 void MacroAssembler::PushHeapObject(Handle<HeapObject> object) {
2508 ALLOW_HANDLE_DEREF(isolate(), "using raw address"); 2520 ALLOW_HANDLE_DEREF(isolate(), "using raw address");
2509 if (isolate()->heap()->InNewSpace(*object)) { 2521 if (isolate()->heap()->InNewSpace(*object)) {
2510 Handle<JSGlobalPropertyCell> cell = 2522 Handle<JSGlobalPropertyCell> cell =
2511 isolate()->factory()->NewJSGlobalPropertyCell(object); 2523 isolate()->factory()->NewJSGlobalPropertyCell(object);
2512 push(Operand::Cell(cell)); 2524 push(Operand::Cell(cell));
2513 } else { 2525 } else {
2514 Push(object); 2526 Push(object);
2515 } 2527 }
2516 } 2528 }
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
3139 j(greater, &no_info_available); 3151 j(greater, &no_info_available);
3140 cmp(MemOperand(scratch_reg, -AllocationSiteInfo::kSize), 3152 cmp(MemOperand(scratch_reg, -AllocationSiteInfo::kSize),
3141 Immediate(Handle<Map>(isolate()->heap()->allocation_site_info_map()))); 3153 Immediate(Handle<Map>(isolate()->heap()->allocation_site_info_map())));
3142 bind(&no_info_available); 3154 bind(&no_info_available);
3143 } 3155 }
3144 3156
3145 3157
3146 } } // namespace v8::internal 3158 } } // namespace v8::internal
3147 3159
3148 #endif // V8_TARGET_ARCH_IA32 3160 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698