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 2678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2689 __ pop(left); | 2689 __ pop(left); |
2690 | 2690 |
2691 Label done, fail, ok; | 2691 Label done, fail, ok; |
2692 __ cmp(left, Operand(right)); | 2692 __ cmp(left, Operand(right)); |
2693 __ j(equal, &ok); | 2693 __ j(equal, &ok); |
2694 // Fail if either is a non-HeapObject. | 2694 // Fail if either is a non-HeapObject. |
2695 __ mov(tmp, left); | 2695 __ mov(tmp, left); |
2696 __ and_(Operand(tmp), right); | 2696 __ and_(Operand(tmp), right); |
2697 __ test(Operand(tmp), Immediate(kSmiTagMask)); | 2697 __ test(Operand(tmp), Immediate(kSmiTagMask)); |
2698 __ j(zero, &fail); | 2698 __ j(zero, &fail); |
2699 __ mov(tmp, FieldOperand(left, HeapObject::kMapOffset)); | 2699 __ CmpObjectType(left, JS_REGEXP_TYPE, tmp); |
2700 __ cmpb(FieldOperand(tmp, Map::kInstanceTypeOffset), | |
2701 static_cast<int8_t>(JS_REGEXP_TYPE)); | |
2702 __ j(not_equal, &fail); | 2700 __ j(not_equal, &fail); |
2703 __ cmp(tmp, FieldOperand(right, HeapObject::kMapOffset)); | 2701 __ cmp(tmp, FieldOperand(right, HeapObject::kMapOffset)); |
2704 __ j(not_equal, &fail); | 2702 __ j(not_equal, &fail); |
2705 __ mov(tmp, FieldOperand(left, JSRegExp::kDataOffset)); | 2703 __ mov(tmp, FieldOperand(left, JSRegExp::kDataOffset)); |
2706 __ cmp(tmp, FieldOperand(right, JSRegExp::kDataOffset)); | 2704 __ cmp(tmp, FieldOperand(right, JSRegExp::kDataOffset)); |
2707 __ j(equal, &ok); | 2705 __ j(equal, &ok); |
2708 __ bind(&fail); | 2706 __ bind(&fail); |
2709 __ mov(eax, Immediate(Factory::false_value())); | 2707 __ mov(eax, Immediate(Factory::false_value())); |
2710 __ jmp(&done); | 2708 __ jmp(&done); |
2711 __ bind(&ok); | 2709 __ bind(&ok); |
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3338 // And return. | 3336 // And return. |
3339 __ ret(0); | 3337 __ ret(0); |
3340 } | 3338 } |
3341 | 3339 |
3342 | 3340 |
3343 #undef __ | 3341 #undef __ |
3344 | 3342 |
3345 } } // namespace v8::internal | 3343 } } // namespace v8::internal |
3346 | 3344 |
3347 #endif // V8_TARGET_ARCH_IA32 | 3345 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |