| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 __ PrepareCallCFunction(argument_count, ecx); | 394 __ PrepareCallCFunction(argument_count, ecx); |
| 395 // Put arguments into allocated stack area, last argument highest on stack. | 395 // Put arguments into allocated stack area, last argument highest on stack. |
| 396 // Parameters are | 396 // Parameters are |
| 397 // Address byte_offset1 - Address captured substring's start. | 397 // Address byte_offset1 - Address captured substring's start. |
| 398 // Address byte_offset2 - Address of current character position. | 398 // Address byte_offset2 - Address of current character position. |
| 399 // size_t byte_length - length of capture in bytes(!) | 399 // size_t byte_length - length of capture in bytes(!) |
| 400 // Isolate* isolate | 400 // Isolate* isolate |
| 401 | 401 |
| 402 // Set isolate. | 402 // Set isolate. |
| 403 __ mov(Operand(esp, 3 * kPointerSize), | 403 __ mov(Operand(esp, 3 * kPointerSize), |
| 404 Immediate(ExternalReference::isolate_address())); | 404 Immediate(ExternalReference::isolate_address(masm_->isolate()))); |
| 405 // Set byte_length. | 405 // Set byte_length. |
| 406 __ mov(Operand(esp, 2 * kPointerSize), ebx); | 406 __ mov(Operand(esp, 2 * kPointerSize), ebx); |
| 407 // Set byte_offset2. | 407 // Set byte_offset2. |
| 408 // Found by adding negative string-end offset of current position (edi) | 408 // Found by adding negative string-end offset of current position (edi) |
| 409 // to end of string. | 409 // to end of string. |
| 410 __ add(edi, esi); | 410 __ add(edi, esi); |
| 411 __ mov(Operand(esp, 1 * kPointerSize), edi); | 411 __ mov(Operand(esp, 1 * kPointerSize), edi); |
| 412 // Set byte_offset1. | 412 // Set byte_offset1. |
| 413 // Start of capture, where edx already holds string-end negative offset. | 413 // Start of capture, where edx already holds string-end negative offset. |
| 414 __ add(edx, esi); | 414 __ add(edx, esi); |
| (...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 965 | 965 |
| 966 Label grow_failed; | 966 Label grow_failed; |
| 967 // Save registers before calling C function | 967 // Save registers before calling C function |
| 968 __ push(esi); | 968 __ push(esi); |
| 969 __ push(edi); | 969 __ push(edi); |
| 970 | 970 |
| 971 // Call GrowStack(backtrack_stackpointer()) | 971 // Call GrowStack(backtrack_stackpointer()) |
| 972 static const int num_arguments = 3; | 972 static const int num_arguments = 3; |
| 973 __ PrepareCallCFunction(num_arguments, ebx); | 973 __ PrepareCallCFunction(num_arguments, ebx); |
| 974 __ mov(Operand(esp, 2 * kPointerSize), | 974 __ mov(Operand(esp, 2 * kPointerSize), |
| 975 Immediate(ExternalReference::isolate_address())); | 975 Immediate(ExternalReference::isolate_address(masm_->isolate()))); |
| 976 __ lea(eax, Operand(ebp, kStackHighEnd)); | 976 __ lea(eax, Operand(ebp, kStackHighEnd)); |
| 977 __ mov(Operand(esp, 1 * kPointerSize), eax); | 977 __ mov(Operand(esp, 1 * kPointerSize), eax); |
| 978 __ mov(Operand(esp, 0 * kPointerSize), backtrack_stackpointer()); | 978 __ mov(Operand(esp, 0 * kPointerSize), backtrack_stackpointer()); |
| 979 ExternalReference grow_stack = | 979 ExternalReference grow_stack = |
| 980 ExternalReference::re_grow_stack(masm_->isolate()); | 980 ExternalReference::re_grow_stack(masm_->isolate()); |
| 981 __ CallCFunction(grow_stack, num_arguments); | 981 __ CallCFunction(grow_stack, num_arguments); |
| 982 // If return NULL, we have failed to grow the stack, and | 982 // If return NULL, we have failed to grow the stack, and |
| 983 // must exit with a stack-overflow exception. | 983 // must exit with a stack-overflow exception. |
| 984 __ or_(eax, eax); | 984 __ or_(eax, eax); |
| 985 __ j(equal, &exit_with_exception); | 985 __ j(equal, &exit_with_exception); |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1401 } | 1401 } |
| 1402 | 1402 |
| 1403 | 1403 |
| 1404 #undef __ | 1404 #undef __ |
| 1405 | 1405 |
| 1406 #endif // V8_INTERPRETED_REGEXP | 1406 #endif // V8_INTERPRETED_REGEXP |
| 1407 | 1407 |
| 1408 }} // namespace v8::internal | 1408 }} // namespace v8::internal |
| 1409 | 1409 |
| 1410 #endif // V8_TARGET_ARCH_IA32 | 1410 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |