OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #if V8_TARGET_ARCH_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
6 | 6 |
7 #include "src/regexp/ia32/regexp-macro-assembler-ia32.h" | 7 #include "src/regexp/ia32/regexp-macro-assembler-ia32.h" |
8 | 8 |
9 #include "src/log.h" | 9 #include "src/log.h" |
10 #include "src/macro-assembler.h" | 10 #include "src/macro-assembler.h" |
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 void RegExpMacroAssemblerIA32::CheckBitInTable( | 504 void RegExpMacroAssemblerIA32::CheckBitInTable( |
505 Handle<ByteArray> table, | 505 Handle<ByteArray> table, |
506 Label* on_bit_set) { | 506 Label* on_bit_set) { |
507 __ mov(eax, Immediate(table)); | 507 __ mov(eax, Immediate(table)); |
508 Register index = current_character(); | 508 Register index = current_character(); |
509 if (mode_ != LATIN1 || kTableMask != String::kMaxOneByteCharCode) { | 509 if (mode_ != LATIN1 || kTableMask != String::kMaxOneByteCharCode) { |
510 __ mov(ebx, kTableSize - 1); | 510 __ mov(ebx, kTableSize - 1); |
511 __ and_(ebx, current_character()); | 511 __ and_(ebx, current_character()); |
512 index = ebx; | 512 index = ebx; |
513 } | 513 } |
514 __ cmpb(FieldOperand(eax, index, times_1, ByteArray::kHeaderSize), 0); | 514 __ cmpb(FieldOperand(eax, index, times_1, ByteArray::kHeaderSize), |
| 515 Immediate(0)); |
515 BranchOrBacktrack(not_equal, on_bit_set); | 516 BranchOrBacktrack(not_equal, on_bit_set); |
516 } | 517 } |
517 | 518 |
518 | 519 |
519 bool RegExpMacroAssemblerIA32::CheckSpecialCharacterClass(uc16 type, | 520 bool RegExpMacroAssemblerIA32::CheckSpecialCharacterClass(uc16 type, |
520 Label* on_no_match) { | 521 Label* on_no_match) { |
521 // Range checks (c in min..max) are generally implemented by an unsigned | 522 // Range checks (c in min..max) are generally implemented by an unsigned |
522 // (c - min) <= (max - min) check | 523 // (c - min) <= (max - min) check |
523 switch (type) { | 524 switch (type) { |
524 case 's': | 525 case 's': |
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1264 | 1265 |
1265 | 1266 |
1266 #undef __ | 1267 #undef __ |
1267 | 1268 |
1268 #endif // V8_INTERPRETED_REGEXP | 1269 #endif // V8_INTERPRETED_REGEXP |
1269 | 1270 |
1270 } // namespace internal | 1271 } // namespace internal |
1271 } // namespace v8 | 1272 } // namespace v8 |
1272 | 1273 |
1273 #endif // V8_TARGET_ARCH_IA32 | 1274 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |