Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 2866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2877 break; | 2877 break; |
| 2878 case TRBinaryOpIC::SMI: | 2878 case TRBinaryOpIC::SMI: |
| 2879 GenerateSmiStub(masm); | 2879 GenerateSmiStub(masm); |
| 2880 break; | 2880 break; |
| 2881 case TRBinaryOpIC::INT32: | 2881 case TRBinaryOpIC::INT32: |
| 2882 GenerateInt32Stub(masm); | 2882 GenerateInt32Stub(masm); |
| 2883 break; | 2883 break; |
| 2884 case TRBinaryOpIC::HEAP_NUMBER: | 2884 case TRBinaryOpIC::HEAP_NUMBER: |
| 2885 GenerateHeapNumberStub(masm); | 2885 GenerateHeapNumberStub(masm); |
| 2886 break; | 2886 break; |
| 2887 case TRBinaryOpIC::ODDBALL: | |
| 2888 GenerateOddballStub(masm); | |
| 2889 break; | |
| 2887 case TRBinaryOpIC::STRING: | 2890 case TRBinaryOpIC::STRING: |
| 2888 GenerateStringStub(masm); | 2891 GenerateStringStub(masm); |
| 2889 break; | 2892 break; |
| 2890 case TRBinaryOpIC::GENERIC: | 2893 case TRBinaryOpIC::GENERIC: |
| 2891 GenerateGeneric(masm); | 2894 GenerateGeneric(masm); |
| 2892 break; | 2895 break; |
| 2893 default: | 2896 default: |
| 2894 UNREACHABLE(); | 2897 UNREACHABLE(); |
| 2895 } | 2898 } |
| 2896 } | 2899 } |
| (...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3599 if (transition.is_linked()) { | 3602 if (transition.is_linked()) { |
| 3600 __ bind(&transition); | 3603 __ bind(&transition); |
| 3601 GenerateTypeTransition(masm); | 3604 GenerateTypeTransition(masm); |
| 3602 } | 3605 } |
| 3603 | 3606 |
| 3604 __ bind(&call_runtime); | 3607 __ bind(&call_runtime); |
| 3605 GenerateCallRuntime(masm); | 3608 GenerateCallRuntime(masm); |
| 3606 } | 3609 } |
| 3607 | 3610 |
| 3608 | 3611 |
| 3612 void TypeRecordingBinaryOpStub::GenerateOddballStub(MacroAssembler* masm) { | |
| 3613 Label call_runtime; | |
| 3614 | |
| 3615 if (op_ == Token::ADD) { | |
| 3616 // Handle string addition here, because it is the only operation | |
| 3617 // that does not do a ToNumber conversion on the operands. | |
| 3618 GenerateAddStrings(masm); | |
| 3619 } | |
| 3620 | |
| 3621 // Convert odd ball arguments to numbers. | |
|
Erik Corry
2011/03/28 15:15:24
odd ball -> oddball
fschneider
2011/03/28 16:28:59
Done.
| |
| 3622 Label check, done; | |
| 3623 __ cmp(r1, Operand(FACTORY->undefined_value())); | |
|
Erik Corry
2011/03/28 15:15:24
You should use CompareRoot here.
fschneider
2011/03/28 16:28:59
Done.
| |
| 3624 __ b(ne, &check); | |
| 3625 if (Token::IsBitOp(op_)) { | |
| 3626 __ mov(r1, Operand(Smi::FromInt(0))); | |
| 3627 } else { | |
| 3628 __ Move(r1, FACTORY->nan_value()); | |
|
Erik Corry
2011/03/28 15:15:24
LoadRoot.
fschneider
2011/03/28 16:28:59
Done.
| |
| 3629 } | |
| 3630 __ jmp(&done); | |
| 3631 __ bind(&check); | |
| 3632 __ cmp(r0, Operand(FACTORY->undefined_value())); | |
| 3633 __ b(ne, &done); | |
| 3634 if (Token::IsBitOp(op_)) { | |
| 3635 __ mov(r0, Operand(Smi::FromInt(0))); | |
| 3636 } else { | |
| 3637 __ Move(r0, FACTORY->nan_value()); | |
|
Erik Corry
2011/03/28 15:15:24
LoadRoot
fschneider
2011/03/28 16:28:59
Done.
| |
| 3638 } | |
| 3639 __ bind(&done); | |
| 3640 | |
| 3641 GenerateHeapNumberStub(masm); | |
| 3642 } | |
| 3643 | |
| 3644 | |
| 3609 void TypeRecordingBinaryOpStub::GenerateHeapNumberStub(MacroAssembler* masm) { | 3645 void TypeRecordingBinaryOpStub::GenerateHeapNumberStub(MacroAssembler* masm) { |
| 3610 Label call_runtime; | 3646 Label call_runtime; |
| 3611 ASSERT(operands_type_ == TRBinaryOpIC::HEAP_NUMBER); | 3647 ASSERT(operands_type_ == TRBinaryOpIC::HEAP_NUMBER); |
| 3612 | 3648 |
| 3613 GenerateFPOperation(masm, false, &call_runtime, &call_runtime); | 3649 GenerateFPOperation(masm, false, &call_runtime, &call_runtime); |
| 3614 | 3650 |
| 3615 __ bind(&call_runtime); | 3651 __ bind(&call_runtime); |
| 3616 GenerateCallRuntime(masm); | 3652 GenerateCallRuntime(masm); |
| 3617 } | 3653 } |
| 3618 | 3654 |
| (...skipping 3244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6863 __ str(pc, MemOperand(sp, 0)); | 6899 __ str(pc, MemOperand(sp, 0)); |
| 6864 __ Jump(target); // Call the C++ function. | 6900 __ Jump(target); // Call the C++ function. |
| 6865 } | 6901 } |
| 6866 | 6902 |
| 6867 | 6903 |
| 6868 #undef __ | 6904 #undef __ |
| 6869 | 6905 |
| 6870 } } // namespace v8::internal | 6906 } } // namespace v8::internal |
| 6871 | 6907 |
| 6872 #endif // V8_TARGET_ARCH_ARM | 6908 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |