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

Side by Side Diff: src/ia32/code-stubs-ia32.cc

Issue 6794052: Combine the incremental-marking write barrier and the remembered-set... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: '' Created 9 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 | « src/ia32/code-stubs-ia32.h ('k') | src/ia32/codegen-ia32.cc » ('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 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 6446 matching lines...) Expand 10 before | Expand all | Expand 10 after
6457 __ pop(ecx); 6457 __ pop(ecx);
6458 __ pop(eax); 6458 __ pop(eax);
6459 __ pop(edx); 6459 __ pop(edx);
6460 __ push(ecx); 6460 __ push(ecx);
6461 6461
6462 // Do a tail call to the rewritten stub. 6462 // Do a tail call to the rewritten stub.
6463 __ jmp(Operand(edi)); 6463 __ jmp(Operand(edi));
6464 } 6464 }
6465 6465
6466 6466
6467 void IncrementalMarkingRecordWriteStub::Generate(MacroAssembler* masm) { 6467 void RecordWriteStub::Generate(MacroAssembler* masm) {
6468 if (IncrementalMarking::IsStopped()) { 6468 NearLabel skip_incremental_part;
6469 __ ret(0); 6469 __ jmp(&skip_incremental_part);
6470 } else { 6470 if (!IncrementalMarking::IsStopped()) {
6471 __ nop(); 6471 ASSERT(masm->get_opcode(-2) == kSkipIncrementalPartInstruction);
6472 masm->set_opcode(-2, kTwoByteNopInstruction);
6472 } 6473 }
6473 6474
6474 __ IncrementalMarkingRecordWriteHelper(object_, 6475 // If we are also emitting the remembered set code in this stub then we have
6475 value_, 6476 // the object we are writing into in the 'object' register and the slot in
6476 scratch_, 6477 // the 'address' register. We insert a primitive test here to ensure that
6477 object_mode_, 6478 // this is the case. Otherwise the 'address' register is merely a scratch
6478 value_mode_, 6479 // register.
6479 scratch_mode_); 6480 if (FLAG_debug_code && emit_remembered_set_ == EMIT_REMEMBERED_SET) {
6481 NearLabel ok;
6482 __ cmp(address_, Operand(object_));
6483 __ j(above_equal, &ok);
6484 __ int3();
6485 __ bind(&ok);
6486 }
6487
6488 __ IncrementalMarkingRecordWriteHelper(object_, value_, address_);
6489
6490 __ bind(&skip_incremental_part);
6491
6492 if (emit_remembered_set_ == EMIT_REMEMBERED_SET) {
6493 Register scratch = value_;
6494 NearLabel done;
6495 __ InNewSpace(object_, scratch, equal, &done);
6496 __ RememberedSetHelper(object_, address_, scratch, save_fp_regs_mode_);
6497 __ bind(&done);
6498 }
6480 __ ret(0); 6499 __ ret(0);
6481 } 6500 }
6482 6501
6483 6502
6484 #undef __ 6503 #undef __
6485 6504
6486 } } // namespace v8::internal 6505 } } // namespace v8::internal
6487 6506
6488 #endif // V8_TARGET_ARCH_IA32 6507 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.h ('k') | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698