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

Side by Side Diff: src/ia32/stub-cache-ia32.cc

Issue 8816021: Rescan cells at the end of mark-sweep. This means they don't need a (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 2504 matching lines...) Expand 10 before | Expand all | Expand 10 after
2515 2515
2516 // Check that the value in the cell is not the hole. If it is, this 2516 // Check that the value in the cell is not the hole. If it is, this
2517 // cell could have been deleted and reintroducing the global needs 2517 // cell could have been deleted and reintroducing the global needs
2518 // to update the property details in the property dictionary of the 2518 // to update the property details in the property dictionary of the
2519 // global object. We bail out to the runtime system to do that. 2519 // global object. We bail out to the runtime system to do that.
2520 __ cmp(cell_operand, factory()->the_hole_value()); 2520 __ cmp(cell_operand, factory()->the_hole_value());
2521 __ j(equal, &miss); 2521 __ j(equal, &miss);
2522 2522
2523 // Store the value in the cell. 2523 // Store the value in the cell.
2524 __ mov(cell_operand, eax); 2524 __ mov(cell_operand, eax);
2525 Label done; 2525 // No write barrier here, because cells are always rescanned.
2526 __ test(eax, Immediate(kSmiTagMask));
2527 __ j(zero, &done);
2528
2529 __ mov(ecx, eax);
2530 __ lea(edx, cell_operand);
2531 // Cells are always in the remembered set.
2532 __ RecordWrite(ebx, // Object.
2533 edx, // Address.
2534 ecx, // Value.
2535 kDontSaveFPRegs,
2536 OMIT_REMEMBERED_SET,
2537 OMIT_SMI_CHECK);
2538 2526
2539 // Return the value (register eax). 2527 // Return the value (register eax).
2540 __ bind(&done);
2541
2542 Counters* counters = isolate()->counters(); 2528 Counters* counters = isolate()->counters();
2543 __ IncrementCounter(counters->named_store_global_inline(), 1); 2529 __ IncrementCounter(counters->named_store_global_inline(), 1);
2544 __ ret(0); 2530 __ ret(0);
2545 2531
2546 // Handle store cache miss. 2532 // Handle store cache miss.
2547 __ bind(&miss); 2533 __ bind(&miss);
2548 __ IncrementCounter(counters->named_store_global_inline_miss(), 1); 2534 __ IncrementCounter(counters->named_store_global_inline_miss(), 1);
2549 Handle<Code> ic = isolate()->builtins()->StoreIC_Miss(); 2535 Handle<Code> ic = isolate()->builtins()->StoreIC_Miss();
2550 __ jmp(ic, RelocInfo::CODE_TARGET); 2536 __ jmp(ic, RelocInfo::CODE_TARGET);
2551 2537
(...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after
3845 Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss(); 3831 Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss();
3846 __ jmp(ic_miss, RelocInfo::CODE_TARGET); 3832 __ jmp(ic_miss, RelocInfo::CODE_TARGET);
3847 } 3833 }
3848 3834
3849 3835
3850 #undef __ 3836 #undef __
3851 3837
3852 } } // namespace v8::internal 3838 } } // namespace v8::internal
3853 3839
3854 #endif // V8_TARGET_ARCH_IA32 3840 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/mark-compact.cc » ('j') | src/mark-compact.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698