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 8522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8533 __ mov(edx, ebx); | 8533 __ mov(edx, ebx); |
8534 __ and_(edx, kStringRepresentationMask); | 8534 __ and_(edx, kStringRepresentationMask); |
8535 __ cmp(edx, kConsStringTag); | 8535 __ cmp(edx, kConsStringTag); |
8536 __ j(not_equal, &runtime); | 8536 __ j(not_equal, &runtime); |
8537 __ mov(edx, FieldOperand(eax, ConsString::kSecondOffset)); | 8537 __ mov(edx, FieldOperand(eax, ConsString::kSecondOffset)); |
8538 __ cmp(Operand(edx), Factory::empty_string()); | 8538 __ cmp(Operand(edx), Factory::empty_string()); |
8539 __ j(not_equal, &runtime); | 8539 __ j(not_equal, &runtime); |
8540 __ mov(eax, FieldOperand(eax, ConsString::kFirstOffset)); | 8540 __ mov(eax, FieldOperand(eax, ConsString::kFirstOffset)); |
8541 __ mov(ebx, FieldOperand(eax, HeapObject::kMapOffset)); | 8541 __ mov(ebx, FieldOperand(eax, HeapObject::kMapOffset)); |
8542 __ movzx_b(ebx, FieldOperand(ebx, Map::kInstanceTypeOffset)); | 8542 __ movzx_b(ebx, FieldOperand(ebx, Map::kInstanceTypeOffset)); |
8543 ASSERT_EQ(0, kSequentialStringTag); | 8543 ASSERT_EQ(0, kSeqStringTag); |
8544 __ test(ebx, Immediate(kStringRepresentationMask)); | 8544 __ test(ebx, Immediate(kStringRepresentationMask)); |
8545 __ j(not_zero, &runtime); | 8545 __ j(not_zero, &runtime); |
8546 __ and_(ebx, kStringRepresentationEncodingMask); | 8546 __ and_(ebx, kStringRepresentationEncodingMask); |
8547 | 8547 |
8548 __ bind(&seq_string); | 8548 __ bind(&seq_string); |
8549 // eax: subject string (sequential either ascii to two byte) | 8549 // eax: subject string (sequential either ascii to two byte) |
8550 // ebx: suject string type & kStringRepresentationEncodingMask | 8550 // ebx: suject string type & kStringRepresentationEncodingMask |
8551 // ecx: RegExp data (FixedArray) | 8551 // ecx: RegExp data (FixedArray) |
8552 // Check that the irregexp code has been generated for an ascii string. If | 8552 // Check that the irregexp code has been generated for an ascii string. If |
8553 // it has, the field contains a code object otherwise it contains the hole. | 8553 // it has, the field contains a code object otherwise it contains the hole. |
(...skipping 1549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10103 | 10103 |
10104 // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater) | 10104 // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater) |
10105 // tagged as a small integer. | 10105 // tagged as a small integer. |
10106 __ bind(&runtime); | 10106 __ bind(&runtime); |
10107 __ TailCallRuntime(ExternalReference(Runtime::kStringCompare), 2, 1); | 10107 __ TailCallRuntime(ExternalReference(Runtime::kStringCompare), 2, 1); |
10108 } | 10108 } |
10109 | 10109 |
10110 #undef __ | 10110 #undef __ |
10111 | 10111 |
10112 } } // namespace v8::internal | 10112 } } // namespace v8::internal |
OLD | NEW |