| 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 5772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5783 Register scratch3, | 5783 Register scratch3, |
| 5784 Register scratch4, | 5784 Register scratch4, |
| 5785 Label* slow) { | 5785 Label* slow) { |
| 5786 // First check if the argument is already a string. | 5786 // First check if the argument is already a string. |
| 5787 Label not_string, done; | 5787 Label not_string, done; |
| 5788 __ JumpIfSmi(arg, ¬_string); | 5788 __ JumpIfSmi(arg, ¬_string); |
| 5789 __ CompareObjectType(arg, scratch1, scratch1, FIRST_NONSTRING_TYPE); | 5789 __ CompareObjectType(arg, scratch1, scratch1, FIRST_NONSTRING_TYPE); |
| 5790 __ b(lt, &done); | 5790 __ b(lt, &done); |
| 5791 | 5791 |
| 5792 // Check the number to string cache. | 5792 // Check the number to string cache. |
| 5793 Label not_cached; | |
| 5794 __ bind(¬_string); | 5793 __ bind(¬_string); |
| 5795 // Puts the cached result into scratch1. | 5794 // Puts the cached result into scratch1. |
| 5796 NumberToStringStub::GenerateLookupNumberStringCache(masm, | 5795 NumberToStringStub::GenerateLookupNumberStringCache(masm, |
| 5797 arg, | 5796 arg, |
| 5798 scratch1, | 5797 scratch1, |
| 5799 scratch2, | 5798 scratch2, |
| 5800 scratch3, | 5799 scratch3, |
| 5801 scratch4, | 5800 scratch4, |
| 5802 ¬_cached); | 5801 slow); |
| 5803 __ mov(arg, scratch1); | 5802 __ mov(arg, scratch1); |
| 5804 __ str(arg, MemOperand(sp, stack_offset)); | 5803 __ str(arg, MemOperand(sp, stack_offset)); |
| 5805 __ jmp(&done); | |
| 5806 | |
| 5807 // Check if the argument is a safe string wrapper. | |
| 5808 __ bind(¬_cached); | |
| 5809 __ JumpIfSmi(arg, slow); | |
| 5810 __ CompareObjectType( | |
| 5811 arg, scratch1, scratch2, JS_VALUE_TYPE); // map -> scratch1. | |
| 5812 __ b(ne, slow); | |
| 5813 __ ldrb(scratch2, FieldMemOperand(scratch1, Map::kBitField2Offset)); | |
| 5814 __ and_(scratch2, | |
| 5815 scratch2, Operand(1 << Map::kStringWrapperSafeForDefaultValueOf)); | |
| 5816 __ cmp(scratch2, | |
| 5817 Operand(1 << Map::kStringWrapperSafeForDefaultValueOf)); | |
| 5818 __ b(ne, slow); | |
| 5819 __ ldr(arg, FieldMemOperand(arg, JSValue::kValueOffset)); | |
| 5820 __ str(arg, MemOperand(sp, stack_offset)); | |
| 5821 | |
| 5822 __ bind(&done); | 5804 __ bind(&done); |
| 5823 } | 5805 } |
| 5824 | 5806 |
| 5825 | 5807 |
| 5826 void ICCompareStub::GenerateSmis(MacroAssembler* masm) { | 5808 void ICCompareStub::GenerateSmis(MacroAssembler* masm) { |
| 5827 ASSERT(state_ == CompareIC::SMI); | 5809 ASSERT(state_ == CompareIC::SMI); |
| 5828 Label miss; | 5810 Label miss; |
| 5829 __ orr(r2, r1, r0); | 5811 __ orr(r2, r1, r0); |
| 5830 __ JumpIfNotSmi(r2, &miss); | 5812 __ JumpIfNotSmi(r2, &miss); |
| 5831 | 5813 |
| (...skipping 1300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7132 __ bind(&fast_elements_case); | 7114 __ bind(&fast_elements_case); |
| 7133 GenerateCase(masm, FAST_ELEMENTS); | 7115 GenerateCase(masm, FAST_ELEMENTS); |
| 7134 } | 7116 } |
| 7135 | 7117 |
| 7136 | 7118 |
| 7137 #undef __ | 7119 #undef __ |
| 7138 | 7120 |
| 7139 } } // namespace v8::internal | 7121 } } // namespace v8::internal |
| 7140 | 7122 |
| 7141 #endif // V8_TARGET_ARCH_ARM | 7123 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |