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

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

Issue 165443: X64: Implement RegExp natively. (Closed)
Patch Set: Addressed review comments. Created 11 years, 4 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
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 // Find the length of the large object (FixedArray). 76 // Find the length of the large object (FixedArray).
77 masm->mov(scratch, Operand(page_start, Page::kObjectStartOffset 77 masm->mov(scratch, Operand(page_start, Page::kObjectStartOffset
78 + FixedArray::kLengthOffset)); 78 + FixedArray::kLengthOffset));
79 Register array_length = scratch; 79 Register array_length = scratch;
80 80
81 // Extra remembered set starts right after the large object (a FixedArray), at 81 // Extra remembered set starts right after the large object (a FixedArray), at
82 // page_start + kObjectStartOffset + objectSize 82 // page_start + kObjectStartOffset + objectSize
83 // where objectSize is FixedArray::kHeaderSize + kPointerSize * array_length. 83 // where objectSize is FixedArray::kHeaderSize + kPointerSize * array_length.
84 // Add the delta between the end of the normal RSet and the start of the 84 // Add the delta between the end of the normal RSet and the start of the
85 // extra RSet to 'object', so that addressing the bit using 'pointer_offset' 85 // extra RSet to 'page_start', so that addressing the bit using
86 // hits the extra RSet words. 86 // 'pointer_offset' hits the extra RSet words.
87 masm->lea(page_start, 87 masm->lea(page_start,
88 Operand(page_start, array_length, times_pointer_size, 88 Operand(page_start, array_length, times_pointer_size,
89 Page::kObjectStartOffset + FixedArray::kHeaderSize 89 Page::kObjectStartOffset + FixedArray::kHeaderSize
90 - Page::kRSetEndOffset)); 90 - Page::kRSetEndOffset));
91 91
92 // NOTE: For now, we use the bit-test-and-set (bts) x86 instruction 92 // NOTE: For now, we use the bit-test-and-set (bts) x86 instruction
93 // to limit code size. We should probably evaluate this decision by 93 // to limit code size. We should probably evaluate this decision by
94 // measuring the performance of an equivalent implementation using 94 // measuring the performance of an equivalent implementation using
95 // "simpler" instructions 95 // "simpler" instructions
96 masm->bind(&fast); 96 masm->bind(&fast);
(...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after
1035 // Indicate that code has changed. 1035 // Indicate that code has changed.
1036 CPU::FlushICache(address_, size_); 1036 CPU::FlushICache(address_, size_);
1037 1037
1038 // Check that the code was patched as expected. 1038 // Check that the code was patched as expected.
1039 ASSERT(masm_.pc_ == address_ + size_); 1039 ASSERT(masm_.pc_ == address_ + size_);
1040 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 1040 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
1041 } 1041 }
1042 1042
1043 1043
1044 } } // namespace v8::internal 1044 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698