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

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

Issue 7058009: Make InToSpace/InFromSpace use the page header. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Used Clear/Set macros more in SemiSpace::Flip Created 9 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
« no previous file with comments | « src/heap-inl.h ('k') | src/ia32/macro-assembler-ia32.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 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 6241 matching lines...) Expand 10 before | Expand all | Expand 10 after
6252 __ mov(value_, Operand(address_, 0)); 6252 __ mov(value_, Operand(address_, 0));
6253 GenerateIncremental(masm); 6253 GenerateIncremental(masm);
6254 } 6254 }
6255 6255
6256 6256
6257 void RecordWriteStub::GenerateIncremental(MacroAssembler* masm) { 6257 void RecordWriteStub::GenerateIncremental(MacroAssembler* masm) {
6258 regs_.Save(masm); 6258 regs_.Save(masm);
6259 6259
6260 Label value_in_old_space; 6260 Label value_in_old_space;
6261 6261
6262 __ CheckPageFlag(value_, regs_.scratch0(), 6262 __ InNewSpace(value_, regs_.scratch0(), not_equal, &value_in_old_space);
6263 MemoryChunk::IN_NEW_SPACE, zero,
6264 &value_in_old_space);
6265 // After this point the value_ register may have been overwritten since it is 6263 // After this point the value_ register may have been overwritten since it is
6266 // also one of the scratch registers. 6264 // also one of the scratch registers.
6267 6265
6268 GenerateIncrementalValueIsInNewSpace(masm); 6266 GenerateIncrementalValueIsInNewSpace(masm);
6269 6267
6270 __ bind(&value_in_old_space); 6268 __ bind(&value_in_old_space);
6271 GenerateIncrementalValueIsInOldSpace(masm); 6269 GenerateIncrementalValueIsInOldSpace(masm);
6272 6270
6273 __ bind(&slow_); 6271 __ bind(&slow_);
6274 // Inform the incremental marker, but don't bother with the remembered set. 6272 // Inform the incremental marker, but don't bother with the remembered set.
(...skipping 18 matching lines...) Expand all
6293 __ ret(0); 6291 __ ret(0);
6294 } 6292 }
6295 6293
6296 6294
6297 void RecordWriteStub::GenerateIncrementalValueIsInNewSpace( 6295 void RecordWriteStub::GenerateIncrementalValueIsInNewSpace(
6298 MacroAssembler* masm) { 6296 MacroAssembler* masm) {
6299 Label both_in_new_space; 6297 Label both_in_new_space;
6300 Label value_in_new_space_object_is_black_no_remembered_set; 6298 Label value_in_new_space_object_is_black_no_remembered_set;
6301 6299
6302 // The value is in new space. Check the object. 6300 // The value is in new space. Check the object.
6303 __ CheckPageFlag(regs_.object(), regs_.scratch0(), 6301 __ InNewSpace(regs_.object(), regs_.scratch0(), equal, &both_in_new_space);
6304 MemoryChunk::IN_NEW_SPACE, not_zero,
6305 &both_in_new_space);
6306 6302
6307 // Value is in new space, object is in old space. Could we be lucky and find 6303 // Value is in new space, object is in old space. Could we be lucky and find
6308 // the scan_on_scavenge flag on the object's page? 6304 // the scan_on_scavenge flag on the object's page?
6309 if (emit_remembered_set_ == EMIT_REMEMBERED_SET) { 6305 if (emit_remembered_set_ == EMIT_REMEMBERED_SET) {
6310 Label scan_on_scavenge; 6306 Label scan_on_scavenge;
6311 __ CheckPageFlag(regs_.object(), 6307 __ CheckPageFlag(regs_.object(),
6312 regs_.scratch0(), 6308 regs_.scratch0(),
6313 MemoryChunk::SCAN_ON_SCAVENGE, 6309 MemoryChunk::SCAN_ON_SCAVENGE,
6314 not_zero, 6310 not_zero,
6315 &scan_on_scavenge); 6311 &scan_on_scavenge);
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
6443 Label::kNear, 6439 Label::kNear,
6444 false); // In old space. 6440 false); // In old space.
6445 __ pop(regs_.object()); 6441 __ pop(regs_.object());
6446 regs_.Restore(masm); 6442 regs_.Restore(masm);
6447 __ ret(0); 6443 __ ret(0);
6448 6444
6449 // The value is in old space and white. We have to find out which space the 6445 // The value is in old space and white. We have to find out which space the
6450 // object is in in order to find its colour. 6446 // object is in in order to find its colour.
6451 __ bind(&value_is_white); 6447 __ bind(&value_is_white);
6452 __ pop(regs_.object()); 6448 __ pop(regs_.object());
6453 __ CheckPageFlag(regs_.object(), regs_.scratch0(), 6449 __ InNewSpace(regs_.object(), regs_.scratch0(), equal,
6454 MemoryChunk::IN_NEW_SPACE, not_zero, 6450 &value_in_old_space_and_white_object_in_new_space);
6455 &value_in_old_space_and_white_object_in_new_space);
6456 6451
6457 // Both in old space, value is white and can't be marked. 6452 // Both in old space, value is white and can't be marked.
6458 __ InOldSpaceIsBlack(regs_.object(), 6453 __ InOldSpaceIsBlack(regs_.object(),
6459 regs_.scratch0(), 6454 regs_.scratch0(),
6460 regs_.scratch1(), 6455 regs_.scratch1(),
6461 &slow_); 6456 &slow_);
6462 regs_.Restore(masm); 6457 regs_.Restore(masm);
6463 __ ret(0); 6458 __ ret(0);
6464 6459
6465 // Object in new space, value in old space and white and can't be marked. 6460 // Object in new space, value in old space and white and can't be marked.
6466 __ bind(&value_in_old_space_and_white_object_in_new_space); 6461 __ bind(&value_in_old_space_and_white_object_in_new_space);
6467 __ InNewSpaceIsBlack(regs_.object(), 6462 __ InNewSpaceIsBlack(regs_.object(),
6468 regs_.scratch0(), 6463 regs_.scratch0(),
6469 regs_.scratch1(), 6464 regs_.scratch1(),
6470 &slow_); 6465 &slow_);
6471 regs_.Restore(masm); 6466 regs_.Restore(masm);
6472 __ ret(0); 6467 __ ret(0);
6473 } 6468 }
6474 6469
6475 6470
6476 #undef __ 6471 #undef __
6477 6472
6478 } } // namespace v8::internal 6473 } } // namespace v8::internal
6479 6474
6480 #endif // V8_TARGET_ARCH_IA32 6475 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/heap-inl.h ('k') | src/ia32/macro-assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698