OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 10938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10949 // Get the length of the string to ebx. | 10949 // Get the length of the string to ebx. |
10950 __ mov(ebx, FieldOperand(eax, String::kLengthOffset)); | 10950 __ mov(ebx, FieldOperand(eax, String::kLengthOffset)); |
10951 | 10951 |
10952 // ebx: Length of subject string as a smi | 10952 // ebx: Length of subject string as a smi |
10953 // ecx: RegExp data (FixedArray) | 10953 // ecx: RegExp data (FixedArray) |
10954 // edx: Number of capture registers | 10954 // edx: Number of capture registers |
10955 // Check that the third argument is a positive smi less than the subject | 10955 // Check that the third argument is a positive smi less than the subject |
10956 // string length. A negative value will be greater (unsigned comparison). | 10956 // string length. A negative value will be greater (unsigned comparison). |
10957 __ mov(eax, Operand(esp, kPreviousIndexOffset)); | 10957 __ mov(eax, Operand(esp, kPreviousIndexOffset)); |
10958 __ test(eax, Immediate(kSmiTagMask)); | 10958 __ test(eax, Immediate(kSmiTagMask)); |
10959 __ j(zero, &runtime); | 10959 __ j(not_zero, &runtime); |
10960 __ cmp(eax, Operand(ebx)); | 10960 __ cmp(eax, Operand(ebx)); |
10961 __ j(above_equal, &runtime); | 10961 __ j(above_equal, &runtime); |
10962 | 10962 |
10963 // ecx: RegExp data (FixedArray) | 10963 // ecx: RegExp data (FixedArray) |
10964 // edx: Number of capture registers | 10964 // edx: Number of capture registers |
10965 // Check that the fourth object is a JSArray object. | 10965 // Check that the fourth object is a JSArray object. |
10966 __ mov(eax, Operand(esp, kLastMatchInfoOffset)); | 10966 __ mov(eax, Operand(esp, kLastMatchInfoOffset)); |
10967 __ test(eax, Immediate(kSmiTagMask)); | 10967 __ test(eax, Immediate(kSmiTagMask)); |
10968 __ j(zero, &runtime); | 10968 __ j(zero, &runtime); |
10969 __ CmpObjectType(eax, JS_ARRAY_TYPE, ebx); | 10969 __ CmpObjectType(eax, JS_ARRAY_TYPE, ebx); |
(...skipping 2145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13115 | 13115 |
13116 // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater) | 13116 // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater) |
13117 // tagged as a small integer. | 13117 // tagged as a small integer. |
13118 __ bind(&runtime); | 13118 __ bind(&runtime); |
13119 __ TailCallRuntime(Runtime::kStringCompare, 2, 1); | 13119 __ TailCallRuntime(Runtime::kStringCompare, 2, 1); |
13120 } | 13120 } |
13121 | 13121 |
13122 #undef __ | 13122 #undef __ |
13123 | 13123 |
13124 } } // namespace v8::internal | 13124 } } // namespace v8::internal |
OLD | NEW |