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

Side by Side Diff: src/ia32/macro-assembler-ia32-inl.h

Issue 7000023: Do inline object filtering (via page flags) before call to RecordWriteStub. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: 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
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 15 matching lines...) Expand all
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 #ifndef V8_IA32_MACRO_ASSEMBLER_IA32_INL_H_ 28 #ifndef V8_IA32_MACRO_ASSEMBLER_IA32_INL_H_
29 #define V8_IA32_MACRO_ASSEMBLER_IA32_INL_H_ 29 #define V8_IA32_MACRO_ASSEMBLER_IA32_INL_H_
30 30
31 #include "macro-assembler.h" 31 #include "macro-assembler.h"
32 32
33 namespace v8 { 33 namespace v8 {
34 namespace internal { 34 namespace internal {
35 35
36
36 template<typename LabelType> 37 template<typename LabelType>
37 void MacroAssembler::HasScanOnScavenge(Register object, 38 void MacroAssembler::CheckPageFlag(
38 Register scratch, 39 Register object,
39 LabelType* scan_on_scavenge) { 40 Register scratch,
41 MemoryChunk::MemoryChunkFlags flag,
42 Condition cc,
43 LabelType* not_set) {
Erik Corry 2011/05/11 18:53:57 not_set seems like the wrong name, since it means
Vyacheslav Egorov (Chromium) 2011/05/13 11:06:52 Done.
40 Move(scratch, object); 44 Move(scratch, object);
41 and_(scratch, ~Page::kPageAlignmentMask); 45 and_(scratch, ~Page::kPageAlignmentMask);
42 cmpb(Operand(scratch, MemoryChunk::kScanOnScavengeOffset), 0); 46 test(Operand(scratch, MemoryChunk::kFlagsOffset), Immediate(1 << flag));
43 j(not_equal, scan_on_scavenge); 47 j(cc, not_set);
44 } 48 }
45 49
46 50
51
47 template<typename LabelType> 52 template<typename LabelType>
48 void MacroAssembler::InOldSpaceIsBlack(Register object, 53 void MacroAssembler::InOldSpaceIsBlack(Register object,
49 Register scratch0, 54 Register scratch0,
50 Register scratch1, 55 Register scratch1,
51 LabelType* is_black) { 56 LabelType* is_black) {
52 HasColour(object, scratch0, scratch1, 57 HasColour(object, scratch0, scratch1,
53 is_black, 58 is_black,
54 Page::kPageAlignmentMask, 59 Page::kPageAlignmentMask,
55 MemoryChunk::kHeaderSize, 60 MemoryChunk::kHeaderSize,
56 1, 0, // kBlackBitPattern. 61 1, 0, // kBlackBitPattern.
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 214
210 // Value is a data object, and it is white. Mark it black. Since we know 215 // Value is a data object, and it is white. Mark it black. Since we know
211 // that the object is white we can make it black by flipping one bit. 216 // that the object is white we can make it black by flipping one bit.
212 or_(Operand(bitmap_scratch, header_size), mask_scratch); 217 or_(Operand(bitmap_scratch, header_size), mask_scratch);
213 bind(&done); 218 bind(&done);
214 } 219 }
215 220
216 } } // namespace v8::internal 221 } } // namespace v8::internal
217 222
218 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_INL_H_ 223 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698