| 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 3475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3486 | 3486 |
| 3487 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: | 3487 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: |
| 3488 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: | 3488 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: |
| 3489 case EXTERNAL_UNSIGNED_INT_ELEMENTS: | 3489 case EXTERNAL_UNSIGNED_INT_ELEMENTS: |
| 3490 case EXTERNAL_PIXEL_ELEMENTS: | 3490 case EXTERNAL_PIXEL_ELEMENTS: |
| 3491 return false; | 3491 return false; |
| 3492 | 3492 |
| 3493 case EXTERNAL_FLOAT_ELEMENTS: | 3493 case EXTERNAL_FLOAT_ELEMENTS: |
| 3494 case EXTERNAL_DOUBLE_ELEMENTS: | 3494 case EXTERNAL_DOUBLE_ELEMENTS: |
| 3495 case FAST_ELEMENTS: | 3495 case FAST_ELEMENTS: |
| 3496 case FAST_SMI_ONLY_ELEMENTS: |
| 3496 case FAST_DOUBLE_ELEMENTS: | 3497 case FAST_DOUBLE_ELEMENTS: |
| 3497 case DICTIONARY_ELEMENTS: | 3498 case DICTIONARY_ELEMENTS: |
| 3498 case NON_STRICT_ARGUMENTS_ELEMENTS: | 3499 case NON_STRICT_ARGUMENTS_ELEMENTS: |
| 3499 UNREACHABLE(); | 3500 UNREACHABLE(); |
| 3500 return false; | 3501 return false; |
| 3501 } | 3502 } |
| 3502 return false; | 3503 return false; |
| 3503 } | 3504 } |
| 3504 | 3505 |
| 3505 | 3506 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3572 __ add(r2, r3, Operand(key, LSL, 2)); | 3573 __ add(r2, r3, Operand(key, LSL, 2)); |
| 3573 __ vldr(d0, r2, 0); | 3574 __ vldr(d0, r2, 0); |
| 3574 } else { | 3575 } else { |
| 3575 __ add(r4, r3, Operand(key, LSL, 2)); | 3576 __ add(r4, r3, Operand(key, LSL, 2)); |
| 3576 // r4: pointer to the beginning of the double we want to load. | 3577 // r4: pointer to the beginning of the double we want to load. |
| 3577 __ ldr(r2, MemOperand(r4, 0)); | 3578 __ ldr(r2, MemOperand(r4, 0)); |
| 3578 __ ldr(r3, MemOperand(r4, Register::kSizeInBytes)); | 3579 __ ldr(r3, MemOperand(r4, Register::kSizeInBytes)); |
| 3579 } | 3580 } |
| 3580 break; | 3581 break; |
| 3581 case FAST_ELEMENTS: | 3582 case FAST_ELEMENTS: |
| 3583 case FAST_SMI_ONLY_ELEMENTS: |
| 3582 case FAST_DOUBLE_ELEMENTS: | 3584 case FAST_DOUBLE_ELEMENTS: |
| 3583 case DICTIONARY_ELEMENTS: | 3585 case DICTIONARY_ELEMENTS: |
| 3584 case NON_STRICT_ARGUMENTS_ELEMENTS: | 3586 case NON_STRICT_ARGUMENTS_ELEMENTS: |
| 3585 UNREACHABLE(); | 3587 UNREACHABLE(); |
| 3586 break; | 3588 break; |
| 3587 } | 3589 } |
| 3588 | 3590 |
| 3589 // For integer array types: | 3591 // For integer array types: |
| 3590 // r2: value | 3592 // r2: value |
| 3591 // For float array type: | 3593 // For float array type: |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3912 r4, s2); // These are: scratch2, single_scratch. | 3914 r4, s2); // These are: scratch2, single_scratch. |
| 3913 if (destination == FloatingPointHelper::kVFPRegisters) { | 3915 if (destination == FloatingPointHelper::kVFPRegisters) { |
| 3914 CpuFeatures::Scope scope(VFP3); | 3916 CpuFeatures::Scope scope(VFP3); |
| 3915 __ vstr(d0, r3, 0); | 3917 __ vstr(d0, r3, 0); |
| 3916 } else { | 3918 } else { |
| 3917 __ str(r6, MemOperand(r3, 0)); | 3919 __ str(r6, MemOperand(r3, 0)); |
| 3918 __ str(r7, MemOperand(r3, Register::kSizeInBytes)); | 3920 __ str(r7, MemOperand(r3, Register::kSizeInBytes)); |
| 3919 } | 3921 } |
| 3920 break; | 3922 break; |
| 3921 case FAST_ELEMENTS: | 3923 case FAST_ELEMENTS: |
| 3924 case FAST_SMI_ONLY_ELEMENTS: |
| 3922 case FAST_DOUBLE_ELEMENTS: | 3925 case FAST_DOUBLE_ELEMENTS: |
| 3923 case DICTIONARY_ELEMENTS: | 3926 case DICTIONARY_ELEMENTS: |
| 3924 case NON_STRICT_ARGUMENTS_ELEMENTS: | 3927 case NON_STRICT_ARGUMENTS_ELEMENTS: |
| 3925 UNREACHABLE(); | 3928 UNREACHABLE(); |
| 3926 break; | 3929 break; |
| 3927 } | 3930 } |
| 3928 | 3931 |
| 3929 // Entry registers are intact, r0 holds the value which is the return value. | 3932 // Entry registers are intact, r0 holds the value which is the return value. |
| 3930 __ Ret(); | 3933 __ Ret(); |
| 3931 | 3934 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3975 __ strh(r5, MemOperand(r3, key, LSL, 0)); | 3978 __ strh(r5, MemOperand(r3, key, LSL, 0)); |
| 3976 break; | 3979 break; |
| 3977 case EXTERNAL_INT_ELEMENTS: | 3980 case EXTERNAL_INT_ELEMENTS: |
| 3978 case EXTERNAL_UNSIGNED_INT_ELEMENTS: | 3981 case EXTERNAL_UNSIGNED_INT_ELEMENTS: |
| 3979 __ str(r5, MemOperand(r3, key, LSL, 1)); | 3982 __ str(r5, MemOperand(r3, key, LSL, 1)); |
| 3980 break; | 3983 break; |
| 3981 case EXTERNAL_PIXEL_ELEMENTS: | 3984 case EXTERNAL_PIXEL_ELEMENTS: |
| 3982 case EXTERNAL_FLOAT_ELEMENTS: | 3985 case EXTERNAL_FLOAT_ELEMENTS: |
| 3983 case EXTERNAL_DOUBLE_ELEMENTS: | 3986 case EXTERNAL_DOUBLE_ELEMENTS: |
| 3984 case FAST_ELEMENTS: | 3987 case FAST_ELEMENTS: |
| 3988 case FAST_SMI_ONLY_ELEMENTS: |
| 3985 case FAST_DOUBLE_ELEMENTS: | 3989 case FAST_DOUBLE_ELEMENTS: |
| 3986 case DICTIONARY_ELEMENTS: | 3990 case DICTIONARY_ELEMENTS: |
| 3987 case NON_STRICT_ARGUMENTS_ELEMENTS: | 3991 case NON_STRICT_ARGUMENTS_ELEMENTS: |
| 3988 UNREACHABLE(); | 3992 UNREACHABLE(); |
| 3989 break; | 3993 break; |
| 3990 } | 3994 } |
| 3991 } | 3995 } |
| 3992 | 3996 |
| 3993 // Entry registers are intact, r0 holds the value which is the return | 3997 // Entry registers are intact, r0 holds the value which is the return |
| 3994 // value. | 3998 // value. |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4114 __ strh(r5, MemOperand(r3, key, LSL, 0)); | 4118 __ strh(r5, MemOperand(r3, key, LSL, 0)); |
| 4115 break; | 4119 break; |
| 4116 case EXTERNAL_INT_ELEMENTS: | 4120 case EXTERNAL_INT_ELEMENTS: |
| 4117 case EXTERNAL_UNSIGNED_INT_ELEMENTS: | 4121 case EXTERNAL_UNSIGNED_INT_ELEMENTS: |
| 4118 __ str(r5, MemOperand(r3, key, LSL, 1)); | 4122 __ str(r5, MemOperand(r3, key, LSL, 1)); |
| 4119 break; | 4123 break; |
| 4120 case EXTERNAL_PIXEL_ELEMENTS: | 4124 case EXTERNAL_PIXEL_ELEMENTS: |
| 4121 case EXTERNAL_FLOAT_ELEMENTS: | 4125 case EXTERNAL_FLOAT_ELEMENTS: |
| 4122 case EXTERNAL_DOUBLE_ELEMENTS: | 4126 case EXTERNAL_DOUBLE_ELEMENTS: |
| 4123 case FAST_ELEMENTS: | 4127 case FAST_ELEMENTS: |
| 4128 case FAST_SMI_ONLY_ELEMENTS: |
| 4124 case FAST_DOUBLE_ELEMENTS: | 4129 case FAST_DOUBLE_ELEMENTS: |
| 4125 case DICTIONARY_ELEMENTS: | 4130 case DICTIONARY_ELEMENTS: |
| 4126 case NON_STRICT_ARGUMENTS_ELEMENTS: | 4131 case NON_STRICT_ARGUMENTS_ELEMENTS: |
| 4127 UNREACHABLE(); | 4132 UNREACHABLE(); |
| 4128 break; | 4133 break; |
| 4129 } | 4134 } |
| 4130 } | 4135 } |
| 4131 } | 4136 } |
| 4132 } | 4137 } |
| 4133 | 4138 |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4266 masm->isolate()->builtins()->KeyedLoadIC_Slow(); | 4271 masm->isolate()->builtins()->KeyedLoadIC_Slow(); |
| 4267 __ Jump(slow_ic, RelocInfo::CODE_TARGET); | 4272 __ Jump(slow_ic, RelocInfo::CODE_TARGET); |
| 4268 | 4273 |
| 4269 __ bind(&miss_force_generic); | 4274 __ bind(&miss_force_generic); |
| 4270 Handle<Code> miss_ic = | 4275 Handle<Code> miss_ic = |
| 4271 masm->isolate()->builtins()->KeyedLoadIC_MissForceGeneric(); | 4276 masm->isolate()->builtins()->KeyedLoadIC_MissForceGeneric(); |
| 4272 __ Jump(miss_ic, RelocInfo::CODE_TARGET); | 4277 __ Jump(miss_ic, RelocInfo::CODE_TARGET); |
| 4273 } | 4278 } |
| 4274 | 4279 |
| 4275 | 4280 |
| 4276 void KeyedStoreStubCompiler::GenerateStoreFastElement(MacroAssembler* masm, | 4281 void KeyedStoreStubCompiler::GenerateStoreFastElement( |
| 4277 bool is_js_array) { | 4282 MacroAssembler* masm, |
| 4283 bool is_js_array, |
| 4284 ElementsKind elements_kind) { |
| 4278 // ----------- S t a t e ------------- | 4285 // ----------- S t a t e ------------- |
| 4279 // -- r0 : value | 4286 // -- r0 : value |
| 4280 // -- r1 : key | 4287 // -- r1 : key |
| 4281 // -- r2 : receiver | 4288 // -- r2 : receiver |
| 4282 // -- lr : return address | 4289 // -- lr : return address |
| 4283 // -- r3 : scratch | 4290 // -- r3 : scratch |
| 4284 // -- r4 : scratch (elements) | 4291 // -- r4 : scratch (elements) |
| 4285 // ----------------------------------- | 4292 // ----------------------------------- |
| 4286 Label miss_force_generic; | 4293 Label miss_force_generic; |
| 4287 | 4294 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 4317 __ b(hs, &miss_force_generic); | 4324 __ b(hs, &miss_force_generic); |
| 4318 | 4325 |
| 4319 __ add(scratch, | 4326 __ add(scratch, |
| 4320 elements_reg, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); | 4327 elements_reg, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); |
| 4321 STATIC_ASSERT(kSmiTag == 0 && kSmiTagSize < kPointerSizeLog2); | 4328 STATIC_ASSERT(kSmiTag == 0 && kSmiTagSize < kPointerSizeLog2); |
| 4322 __ add(scratch, | 4329 __ add(scratch, |
| 4323 scratch, | 4330 scratch, |
| 4324 Operand(key_reg, LSL, kPointerSizeLog2 - kSmiTagSize)); | 4331 Operand(key_reg, LSL, kPointerSizeLog2 - kSmiTagSize)); |
| 4325 __ str(value_reg, MemOperand(scratch)); | 4332 __ str(value_reg, MemOperand(scratch)); |
| 4326 __ mov(receiver_reg, value_reg); | 4333 __ mov(receiver_reg, value_reg); |
| 4334 ASSERT(elements_kind == FAST_ELEMENTS); |
| 4327 __ RecordWrite(elements_reg, // Object. | 4335 __ RecordWrite(elements_reg, // Object. |
| 4328 scratch, // Address. | 4336 scratch, // Address. |
| 4329 receiver_reg, // Value. | 4337 receiver_reg, // Value. |
| 4330 kLRHasNotBeenSaved, | 4338 kLRHasNotBeenSaved, |
| 4331 kDontSaveFPRegs); | 4339 kDontSaveFPRegs); |
| 4332 | 4340 |
| 4333 // value_reg (r0) is preserved. | 4341 // value_reg (r0) is preserved. |
| 4334 // Done. | 4342 // Done. |
| 4335 __ Ret(); | 4343 __ Ret(); |
| 4336 | 4344 |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4465 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric(); | 4473 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric(); |
| 4466 __ Jump(ic, RelocInfo::CODE_TARGET); | 4474 __ Jump(ic, RelocInfo::CODE_TARGET); |
| 4467 } | 4475 } |
| 4468 | 4476 |
| 4469 | 4477 |
| 4470 #undef __ | 4478 #undef __ |
| 4471 | 4479 |
| 4472 } } // namespace v8::internal | 4480 } } // namespace v8::internal |
| 4473 | 4481 |
| 4474 #endif // V8_TARGET_ARCH_ARM | 4482 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |