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

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

Issue 84823003: Revert r18029. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/mips/macro-assembler-mips.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 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 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 607
608 ASSERT(!object.is(value)); 608 ASSERT(!object.is(value));
609 ASSERT(!object.is(address)); 609 ASSERT(!object.is(address));
610 ASSERT(!value.is(address)); 610 ASSERT(!value.is(address));
611 AssertNotSmi(object); 611 AssertNotSmi(object);
612 612
613 if (!FLAG_incremental_marking) { 613 if (!FLAG_incremental_marking) {
614 return; 614 return;
615 } 615 }
616 616
617 // Count number of write barriers in generated code.
618 isolate()->counters()->write_barriers_static()->Increment();
619 IncrementCounter(isolate()->counters()->write_barriers_dynamic(), 1);
620
621 // A single check of the map's pages interesting flag suffices, since it is 617 // A single check of the map's pages interesting flag suffices, since it is
622 // only set during incremental collection, and then it's also guaranteed that 618 // only set during incremental collection, and then it's also guaranteed that
623 // the from object's page's interesting flag is also set. This optimization 619 // the from object's page's interesting flag is also set. This optimization
624 // relies on the fact that maps can never be in new space. 620 // relies on the fact that maps can never be in new space.
625 ASSERT(!isolate()->heap()->InNewSpace(*map)); 621 ASSERT(!isolate()->heap()->InNewSpace(*map));
626 CheckPageFlagForMap(map, 622 CheckPageFlagForMap(map,
627 MemoryChunk::kPointersToHereAreInterestingMask, 623 MemoryChunk::kPointersToHereAreInterestingMask,
628 zero, 624 zero,
629 &done, 625 &done,
630 Label::kNear); 626 Label::kNear);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 } 663 }
668 664
669 if (emit_debug_code()) { 665 if (emit_debug_code()) {
670 Label ok; 666 Label ok;
671 cmp(value, Operand(address, 0)); 667 cmp(value, Operand(address, 0));
672 j(equal, &ok, Label::kNear); 668 j(equal, &ok, Label::kNear);
673 int3(); 669 int3();
674 bind(&ok); 670 bind(&ok);
675 } 671 }
676 672
677 // Count number of write barriers in generated code.
678 isolate()->counters()->write_barriers_static()->Increment();
679 IncrementCounter(isolate()->counters()->write_barriers_dynamic(), 1);
680
681 // First, check if a write barrier is even needed. The tests below 673 // First, check if a write barrier is even needed. The tests below
682 // catch stores of Smis and stores into young gen. 674 // catch stores of Smis and stores into young gen.
683 Label done; 675 Label done;
684 676
685 if (smi_check == INLINE_SMI_CHECK) { 677 if (smi_check == INLINE_SMI_CHECK) {
686 // Skip barrier if writing a smi. 678 // Skip barrier if writing a smi.
687 JumpIfSmi(value, &done, Label::kNear); 679 JumpIfSmi(value, &done, Label::kNear);
688 } 680 }
689 681
690 CheckPageFlag(value, 682 CheckPageFlag(value,
(...skipping 3002 matching lines...) Expand 10 before | Expand all | Expand 10 after
3693 cmp(scratch1, Immediate(DICTIONARY_ELEMENTS)); 3685 cmp(scratch1, Immediate(DICTIONARY_ELEMENTS));
3694 j(equal, found); 3686 j(equal, found);
3695 mov(current, FieldOperand(current, Map::kPrototypeOffset)); 3687 mov(current, FieldOperand(current, Map::kPrototypeOffset));
3696 cmp(current, Immediate(factory->null_value())); 3688 cmp(current, Immediate(factory->null_value()));
3697 j(not_equal, &loop_again); 3689 j(not_equal, &loop_again);
3698 } 3690 }
3699 3691
3700 } } // namespace v8::internal 3692 } } // namespace v8::internal
3701 3693
3702 #endif // V8_TARGET_ARCH_IA32 3694 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/mips/macro-assembler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698