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

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

Issue 7970009: Merged from GC branch to bleeding_edge (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Updated test expectations. More passes, but not all. Created 9 years, 3 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/flag-definitions.h ('k') | src/incremental-marking.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 2563 matching lines...) Expand 10 before | Expand all | Expand 10 after
2574 and_(Operand(length), Immediate(kStringEncodingMask)); 2574 and_(Operand(length), Immediate(kStringEncodingMask));
2575 xor_(Operand(length), Immediate(kStringEncodingMask)); 2575 xor_(Operand(length), Immediate(kStringEncodingMask));
2576 add(Operand(length), Immediate(0x04)); 2576 add(Operand(length), Immediate(0x04));
2577 // Value now either 4 (if ASCII) or 8 (if UC16), i.e., char-size shifted 2577 // Value now either 4 (if ASCII) or 8 (if UC16), i.e., char-size shifted
2578 // by 2. If we multiply the string length as smi by this, it still 2578 // by 2. If we multiply the string length as smi by this, it still
2579 // won't overflow a 32-bit value. 2579 // won't overflow a 32-bit value.
2580 ASSERT_EQ(SeqAsciiString::kMaxSize, SeqTwoByteString::kMaxSize); 2580 ASSERT_EQ(SeqAsciiString::kMaxSize, SeqTwoByteString::kMaxSize);
2581 ASSERT(SeqAsciiString::kMaxSize <= 2581 ASSERT(SeqAsciiString::kMaxSize <=
2582 static_cast<int>(0xffffffffu >> (2 + kSmiTagSize))); 2582 static_cast<int>(0xffffffffu >> (2 + kSmiTagSize)));
2583 imul(length, FieldOperand(value, String::kLengthOffset)); 2583 imul(length, FieldOperand(value, String::kLengthOffset));
2584 shr(length, 2 + kSmiTagSize); 2584 shr(length, 2 + kSmiTagSize + kSmiShiftSize);
2585 add(Operand(length), 2585 add(Operand(length),
2586 Immediate(SeqString::kHeaderSize + kObjectAlignmentMask)); 2586 Immediate(SeqString::kHeaderSize + kObjectAlignmentMask));
2587 and_(Operand(length), 2587 and_(Operand(length),
2588 Immediate(~kObjectAlignmentMask)); 2588 Immediate(~kObjectAlignmentMask));
2589 2589
2590 bind(&is_data_object); 2590 bind(&is_data_object);
2591 // Value is a data object, and it is white. Mark it black. Since we know 2591 // Value is a data object, and it is white. Mark it black. Since we know
2592 // that the object is white we can make it black by flipping one bit. 2592 // that the object is white we can make it black by flipping one bit.
2593 or_(Operand(bitmap_scratch, MemoryChunk::kHeaderSize), mask_scratch); 2593 or_(Operand(bitmap_scratch, MemoryChunk::kHeaderSize), mask_scratch);
2594 2594
2595 and_(bitmap_scratch, Immediate(~Page::kPageAlignmentMask)); 2595 and_(bitmap_scratch, Immediate(~Page::kPageAlignmentMask));
2596 add(Operand(bitmap_scratch, MemoryChunk::kLiveBytesOffset), 2596 add(Operand(bitmap_scratch, MemoryChunk::kLiveBytesOffset),
2597 length); 2597 length);
2598 if (FLAG_debug_code) {
2599 mov(length, Operand(bitmap_scratch, MemoryChunk::kLiveBytesOffset));
2600 cmp(length, Operand(bitmap_scratch, MemoryChunk::kSizeOffset));
2601 Check(less_equal, "Live Bytes Count overflow chunk size");
2602 }
2598 2603
2599 bind(&done); 2604 bind(&done);
2600 } 2605 }
2601 2606
2602 } } // namespace v8::internal 2607 } } // namespace v8::internal
2603 2608
2604 #endif // V8_TARGET_ARCH_IA32 2609 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/incremental-marking.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698