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 3411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3422 case JSObject::EXTERNAL_UNSIGNED_SHORT_ELEMENTS: | 3422 case JSObject::EXTERNAL_UNSIGNED_SHORT_ELEMENTS: |
3423 case JSObject::EXTERNAL_UNSIGNED_INT_ELEMENTS: | 3423 case JSObject::EXTERNAL_UNSIGNED_INT_ELEMENTS: |
3424 case JSObject::EXTERNAL_PIXEL_ELEMENTS: | 3424 case JSObject::EXTERNAL_PIXEL_ELEMENTS: |
3425 return false; | 3425 return false; |
3426 | 3426 |
3427 case JSObject::EXTERNAL_FLOAT_ELEMENTS: | 3427 case JSObject::EXTERNAL_FLOAT_ELEMENTS: |
3428 case JSObject::EXTERNAL_DOUBLE_ELEMENTS: | 3428 case JSObject::EXTERNAL_DOUBLE_ELEMENTS: |
3429 case JSObject::FAST_ELEMENTS: | 3429 case JSObject::FAST_ELEMENTS: |
3430 case JSObject::FAST_DOUBLE_ELEMENTS: | 3430 case JSObject::FAST_DOUBLE_ELEMENTS: |
3431 case JSObject::DICTIONARY_ELEMENTS: | 3431 case JSObject::DICTIONARY_ELEMENTS: |
| 3432 case JSObject::NON_STRICT_ARGUMENTS_ELEMENTS: |
3432 UNREACHABLE(); | 3433 UNREACHABLE(); |
3433 return false; | 3434 return false; |
3434 } | 3435 } |
3435 return false; | 3436 return false; |
3436 } | 3437 } |
3437 | 3438 |
3438 | 3439 |
3439 void KeyedLoadStubCompiler::GenerateLoadExternalArray( | 3440 void KeyedLoadStubCompiler::GenerateLoadExternalArray( |
3440 MacroAssembler* masm, | 3441 MacroAssembler* masm, |
3441 JSObject::ElementsKind elements_kind) { | 3442 JSObject::ElementsKind elements_kind) { |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3507 } else { | 3508 } else { |
3508 __ add(r4, r3, Operand(key, LSL, 2)); | 3509 __ add(r4, r3, Operand(key, LSL, 2)); |
3509 // r4: pointer to the beginning of the double we want to load. | 3510 // r4: pointer to the beginning of the double we want to load. |
3510 __ ldr(r2, MemOperand(r4, 0)); | 3511 __ ldr(r2, MemOperand(r4, 0)); |
3511 __ ldr(r3, MemOperand(r4, Register::kSizeInBytes)); | 3512 __ ldr(r3, MemOperand(r4, Register::kSizeInBytes)); |
3512 } | 3513 } |
3513 break; | 3514 break; |
3514 case JSObject::FAST_ELEMENTS: | 3515 case JSObject::FAST_ELEMENTS: |
3515 case JSObject::FAST_DOUBLE_ELEMENTS: | 3516 case JSObject::FAST_DOUBLE_ELEMENTS: |
3516 case JSObject::DICTIONARY_ELEMENTS: | 3517 case JSObject::DICTIONARY_ELEMENTS: |
| 3518 case JSObject::NON_STRICT_ARGUMENTS_ELEMENTS: |
3517 UNREACHABLE(); | 3519 UNREACHABLE(); |
3518 break; | 3520 break; |
3519 } | 3521 } |
3520 | 3522 |
3521 // For integer array types: | 3523 // For integer array types: |
3522 // r2: value | 3524 // r2: value |
3523 // For float array type: | 3525 // For float array type: |
3524 // s0: value (if VFP3 is supported) | 3526 // s0: value (if VFP3 is supported) |
3525 // r2: value (if VFP3 is not supported) | 3527 // r2: value (if VFP3 is not supported) |
3526 // For double array type: | 3528 // For double array type: |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3848 CpuFeatures::Scope scope(VFP3); | 3850 CpuFeatures::Scope scope(VFP3); |
3849 __ vstr(d0, r3, 0); | 3851 __ vstr(d0, r3, 0); |
3850 } else { | 3852 } else { |
3851 __ str(r6, MemOperand(r3, 0)); | 3853 __ str(r6, MemOperand(r3, 0)); |
3852 __ str(r7, MemOperand(r3, Register::kSizeInBytes)); | 3854 __ str(r7, MemOperand(r3, Register::kSizeInBytes)); |
3853 } | 3855 } |
3854 break; | 3856 break; |
3855 case JSObject::FAST_ELEMENTS: | 3857 case JSObject::FAST_ELEMENTS: |
3856 case JSObject::FAST_DOUBLE_ELEMENTS: | 3858 case JSObject::FAST_DOUBLE_ELEMENTS: |
3857 case JSObject::DICTIONARY_ELEMENTS: | 3859 case JSObject::DICTIONARY_ELEMENTS: |
| 3860 case JSObject::NON_STRICT_ARGUMENTS_ELEMENTS: |
3858 UNREACHABLE(); | 3861 UNREACHABLE(); |
3859 break; | 3862 break; |
3860 } | 3863 } |
3861 | 3864 |
3862 // Entry registers are intact, r0 holds the value which is the return value. | 3865 // Entry registers are intact, r0 holds the value which is the return value. |
3863 __ Ret(); | 3866 __ Ret(); |
3864 | 3867 |
3865 if (elements_kind != JSObject::EXTERNAL_PIXEL_ELEMENTS) { | 3868 if (elements_kind != JSObject::EXTERNAL_PIXEL_ELEMENTS) { |
3866 // r3: external array. | 3869 // r3: external array. |
3867 // r4: index (integer). | 3870 // r4: index (integer). |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3912 case JSObject::EXTERNAL_INT_ELEMENTS: | 3915 case JSObject::EXTERNAL_INT_ELEMENTS: |
3913 case JSObject::EXTERNAL_UNSIGNED_INT_ELEMENTS: | 3916 case JSObject::EXTERNAL_UNSIGNED_INT_ELEMENTS: |
3914 __ str(r5, MemOperand(r3, r4, LSL, 2)); | 3917 __ str(r5, MemOperand(r3, r4, LSL, 2)); |
3915 break; | 3918 break; |
3916 case JSObject::EXTERNAL_PIXEL_ELEMENTS: | 3919 case JSObject::EXTERNAL_PIXEL_ELEMENTS: |
3917 case JSObject::EXTERNAL_FLOAT_ELEMENTS: | 3920 case JSObject::EXTERNAL_FLOAT_ELEMENTS: |
3918 case JSObject::EXTERNAL_DOUBLE_ELEMENTS: | 3921 case JSObject::EXTERNAL_DOUBLE_ELEMENTS: |
3919 case JSObject::FAST_ELEMENTS: | 3922 case JSObject::FAST_ELEMENTS: |
3920 case JSObject::FAST_DOUBLE_ELEMENTS: | 3923 case JSObject::FAST_DOUBLE_ELEMENTS: |
3921 case JSObject::DICTIONARY_ELEMENTS: | 3924 case JSObject::DICTIONARY_ELEMENTS: |
| 3925 case JSObject::NON_STRICT_ARGUMENTS_ELEMENTS: |
3922 UNREACHABLE(); | 3926 UNREACHABLE(); |
3923 break; | 3927 break; |
3924 } | 3928 } |
3925 } | 3929 } |
3926 | 3930 |
3927 // Entry registers are intact, r0 holds the value which is the return | 3931 // Entry registers are intact, r0 holds the value which is the return |
3928 // value. | 3932 // value. |
3929 __ Ret(); | 3933 __ Ret(); |
3930 } else { | 3934 } else { |
3931 // VFP3 is not available do manual conversions. | 3935 // VFP3 is not available do manual conversions. |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4050 case JSObject::EXTERNAL_INT_ELEMENTS: | 4054 case JSObject::EXTERNAL_INT_ELEMENTS: |
4051 case JSObject::EXTERNAL_UNSIGNED_INT_ELEMENTS: | 4055 case JSObject::EXTERNAL_UNSIGNED_INT_ELEMENTS: |
4052 __ str(r5, MemOperand(r3, r4, LSL, 2)); | 4056 __ str(r5, MemOperand(r3, r4, LSL, 2)); |
4053 break; | 4057 break; |
4054 case JSObject::EXTERNAL_PIXEL_ELEMENTS: | 4058 case JSObject::EXTERNAL_PIXEL_ELEMENTS: |
4055 case JSObject::EXTERNAL_FLOAT_ELEMENTS: | 4059 case JSObject::EXTERNAL_FLOAT_ELEMENTS: |
4056 case JSObject::EXTERNAL_DOUBLE_ELEMENTS: | 4060 case JSObject::EXTERNAL_DOUBLE_ELEMENTS: |
4057 case JSObject::FAST_ELEMENTS: | 4061 case JSObject::FAST_ELEMENTS: |
4058 case JSObject::FAST_DOUBLE_ELEMENTS: | 4062 case JSObject::FAST_DOUBLE_ELEMENTS: |
4059 case JSObject::DICTIONARY_ELEMENTS: | 4063 case JSObject::DICTIONARY_ELEMENTS: |
| 4064 case JSObject::NON_STRICT_ARGUMENTS_ELEMENTS: |
4060 UNREACHABLE(); | 4065 UNREACHABLE(); |
4061 break; | 4066 break; |
4062 } | 4067 } |
4063 } | 4068 } |
4064 } | 4069 } |
4065 } | 4070 } |
4066 | 4071 |
4067 // Slow case, key and receiver still in r0 and r1. | 4072 // Slow case, key and receiver still in r0 and r1. |
4068 __ bind(&slow); | 4073 __ bind(&slow); |
4069 __ IncrementCounter( | 4074 __ IncrementCounter( |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4196 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric(); | 4201 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric(); |
4197 __ Jump(ic, RelocInfo::CODE_TARGET); | 4202 __ Jump(ic, RelocInfo::CODE_TARGET); |
4198 } | 4203 } |
4199 | 4204 |
4200 | 4205 |
4201 #undef __ | 4206 #undef __ |
4202 | 4207 |
4203 } } // namespace v8::internal | 4208 } } // namespace v8::internal |
4204 | 4209 |
4205 #endif // V8_TARGET_ARCH_ARM | 4210 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |