| 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 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 869 | 869 |
| 870 // The slow case calls into the runtime to complete the store without causing | 870 // The slow case calls into the runtime to complete the store without causing |
| 871 // an IC miss that would otherwise cause a transition to the generic stub. | 871 // an IC miss that would otherwise cause a transition to the generic stub. |
| 872 ExternalReference ref = | 872 ExternalReference ref = |
| 873 ExternalReference(IC_Utility(kKeyedStoreIC_Slow), masm->isolate()); | 873 ExternalReference(IC_Utility(kKeyedStoreIC_Slow), masm->isolate()); |
| 874 __ TailCallExternalReference(ref, 3, 1); | 874 __ TailCallExternalReference(ref, 3, 1); |
| 875 } | 875 } |
| 876 | 876 |
| 877 | 877 |
| 878 void KeyedStoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm, | 878 void KeyedStoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm, |
| 879 StrictModeFlag strict_mode) { | 879 StrictMode strict_mode) { |
| 880 // ---------- S t a t e -------------- | 880 // ---------- S t a t e -------------- |
| 881 // -- r0 : value | 881 // -- r0 : value |
| 882 // -- r1 : key | 882 // -- r1 : key |
| 883 // -- r2 : receiver | 883 // -- r2 : receiver |
| 884 // -- lr : return address | 884 // -- lr : return address |
| 885 // ----------------------------------- | 885 // ----------------------------------- |
| 886 | 886 |
| 887 // Push receiver, key and value for runtime call. | 887 // Push receiver, key and value for runtime call. |
| 888 __ Push(r2, r1, r0); | 888 __ Push(r2, r1, r0); |
| 889 | 889 |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1053 slow); | 1053 slow); |
| 1054 ASSERT(receiver_map.is(r3)); // Transition code expects map in r3 | 1054 ASSERT(receiver_map.is(r3)); // Transition code expects map in r3 |
| 1055 mode = AllocationSite::GetMode(FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS); | 1055 mode = AllocationSite::GetMode(FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS); |
| 1056 ElementsTransitionGenerator::GenerateDoubleToObject(masm, mode, slow); | 1056 ElementsTransitionGenerator::GenerateDoubleToObject(masm, mode, slow); |
| 1057 __ ldr(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); | 1057 __ ldr(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); |
| 1058 __ jmp(&finish_object_store); | 1058 __ jmp(&finish_object_store); |
| 1059 } | 1059 } |
| 1060 | 1060 |
| 1061 | 1061 |
| 1062 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm, | 1062 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm, |
| 1063 StrictModeFlag strict_mode) { | 1063 StrictMode strict_mode) { |
| 1064 // ---------- S t a t e -------------- | 1064 // ---------- S t a t e -------------- |
| 1065 // -- r0 : value | 1065 // -- r0 : value |
| 1066 // -- r1 : key | 1066 // -- r1 : key |
| 1067 // -- r2 : receiver | 1067 // -- r2 : receiver |
| 1068 // -- lr : return address | 1068 // -- lr : return address |
| 1069 // ----------------------------------- | 1069 // ----------------------------------- |
| 1070 Label slow, fast_object, fast_object_grow; | 1070 Label slow, fast_object, fast_object_grow; |
| 1071 Label fast_double, fast_double_grow; | 1071 Label fast_double, fast_double_grow; |
| 1072 Label array, extra, check_if_double_array; | 1072 Label array, extra, check_if_double_array; |
| 1073 | 1073 |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1212 1, r4, r5); | 1212 1, r4, r5); |
| 1213 __ Ret(); | 1213 __ Ret(); |
| 1214 | 1214 |
| 1215 __ bind(&miss); | 1215 __ bind(&miss); |
| 1216 __ IncrementCounter(counters->store_normal_miss(), 1, r4, r5); | 1216 __ IncrementCounter(counters->store_normal_miss(), 1, r4, r5); |
| 1217 GenerateMiss(masm); | 1217 GenerateMiss(masm); |
| 1218 } | 1218 } |
| 1219 | 1219 |
| 1220 | 1220 |
| 1221 void StoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm, | 1221 void StoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm, |
| 1222 StrictModeFlag strict_mode) { | 1222 StrictMode strict_mode) { |
| 1223 // ----------- S t a t e ------------- | 1223 // ----------- S t a t e ------------- |
| 1224 // -- r0 : value | 1224 // -- r0 : value |
| 1225 // -- r1 : receiver | 1225 // -- r1 : receiver |
| 1226 // -- r2 : name | 1226 // -- r2 : name |
| 1227 // -- lr : return address | 1227 // -- lr : return address |
| 1228 // ----------------------------------- | 1228 // ----------------------------------- |
| 1229 | 1229 |
| 1230 __ Push(r1, r2, r0); | 1230 __ Push(r1, r2, r0); |
| 1231 | 1231 |
| 1232 __ mov(r1, Operand(Smi::FromInt(NONE))); // PropertyAttributes | 1232 __ mov(r1, Operand(Smi::FromInt(NONE))); // PropertyAttributes |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1331 } else { | 1331 } else { |
| 1332 ASSERT(Assembler::GetCondition(branch_instr) == ne); | 1332 ASSERT(Assembler::GetCondition(branch_instr) == ne); |
| 1333 patcher.EmitCondition(eq); | 1333 patcher.EmitCondition(eq); |
| 1334 } | 1334 } |
| 1335 } | 1335 } |
| 1336 | 1336 |
| 1337 | 1337 |
| 1338 } } // namespace v8::internal | 1338 } } // namespace v8::internal |
| 1339 | 1339 |
| 1340 #endif // V8_TARGET_ARCH_ARM | 1340 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |