| OLD | NEW |
| 1 // Copyright 2008-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2008-2009 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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 // Set byte_offset2. | 389 // Set byte_offset2. |
| 390 // Found by adding negative string-end offset of current position (edi) | 390 // Found by adding negative string-end offset of current position (edi) |
| 391 // to end of string. | 391 // to end of string. |
| 392 __ add(edi, Operand(esi)); | 392 __ add(edi, Operand(esi)); |
| 393 __ mov(Operand(esp, 1 * kPointerSize), edi); | 393 __ mov(Operand(esp, 1 * kPointerSize), edi); |
| 394 // Set byte_offset1. | 394 // Set byte_offset1. |
| 395 // Start of capture, where edx already holds string-end negative offset. | 395 // Start of capture, where edx already holds string-end negative offset. |
| 396 __ add(edx, Operand(esi)); | 396 __ add(edx, Operand(esi)); |
| 397 __ mov(Operand(esp, 0 * kPointerSize), edx); | 397 __ mov(Operand(esp, 0 * kPointerSize), edx); |
| 398 | 398 |
| 399 { | 399 ExternalReference compare = |
| 400 AllowExternalCallThatCantCauseGC scope(masm_); | 400 ExternalReference::re_case_insensitive_compare_uc16(masm_->isolate()); |
| 401 ExternalReference compare = | 401 __ CallCFunction(compare, argument_count); |
| 402 ExternalReference::re_case_insensitive_compare_uc16(masm_->isolate()); | |
| 403 __ CallCFunction(compare, argument_count); | |
| 404 } | |
| 405 // Pop original values before reacting on result value. | 402 // Pop original values before reacting on result value. |
| 406 __ pop(ebx); | 403 __ pop(ebx); |
| 407 __ pop(backtrack_stackpointer()); | 404 __ pop(backtrack_stackpointer()); |
| 408 __ pop(edi); | 405 __ pop(edi); |
| 409 __ pop(esi); | 406 __ pop(esi); |
| 410 | 407 |
| 411 // Check if function returned non-zero for success or zero for failure. | 408 // Check if function returned non-zero for success or zero for failure. |
| 412 __ or_(eax, Operand(eax)); | 409 __ or_(eax, Operand(eax)); |
| 413 BranchOrBacktrack(zero, on_no_match); | 410 BranchOrBacktrack(zero, on_no_match); |
| 414 // On success, increment position by length of capture. | 411 // On success, increment position by length of capture. |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 664 __ jmp(&exit_label_); | 661 __ jmp(&exit_label_); |
| 665 } | 662 } |
| 666 | 663 |
| 667 | 664 |
| 668 Handle<HeapObject> RegExpMacroAssemblerIA32::GetCode(Handle<String> source) { | 665 Handle<HeapObject> RegExpMacroAssemblerIA32::GetCode(Handle<String> source) { |
| 669 // Finalize code - write the entry point code now we know how many | 666 // Finalize code - write the entry point code now we know how many |
| 670 // registers we need. | 667 // registers we need. |
| 671 | 668 |
| 672 // Entry code: | 669 // Entry code: |
| 673 __ bind(&entry_label_); | 670 __ bind(&entry_label_); |
| 674 | 671 // Start new stack frame. |
| 675 // Tell the system that we have a stack frame. Because the type is MANUAL, no | |
| 676 // is generated. | |
| 677 FrameScope scope(masm_, StackFrame::MANUAL); | |
| 678 | |
| 679 // Actually emit code to start a new stack frame. | |
| 680 __ push(ebp); | 672 __ push(ebp); |
| 681 __ mov(ebp, esp); | 673 __ mov(ebp, esp); |
| 682 // Save callee-save registers. Order here should correspond to order of | 674 // Save callee-save registers. Order here should correspond to order of |
| 683 // kBackup_ebx etc. | 675 // kBackup_ebx etc. |
| 684 __ push(esi); | 676 __ push(esi); |
| 685 __ push(edi); | 677 __ push(edi); |
| 686 __ push(ebx); // Callee-save on MacOS. | 678 __ push(ebx); // Callee-save on MacOS. |
| 687 __ push(Immediate(0)); // Make room for "input start - 1" constant. | 679 __ push(Immediate(0)); // Make room for "input start - 1" constant. |
| 688 | 680 |
| 689 // Check if we have space on the stack for registers. | 681 // Check if we have space on the stack for registers. |
| (...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1262 } | 1254 } |
| 1263 | 1255 |
| 1264 | 1256 |
| 1265 #undef __ | 1257 #undef __ |
| 1266 | 1258 |
| 1267 #endif // V8_INTERPRETED_REGEXP | 1259 #endif // V8_INTERPRETED_REGEXP |
| 1268 | 1260 |
| 1269 }} // namespace v8::internal | 1261 }} // namespace v8::internal |
| 1270 | 1262 |
| 1271 #endif // V8_TARGET_ARCH_IA32 | 1263 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |