OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
923 | 923 |
924 // The slow case calls into the runtime to complete the store without causing | 924 // The slow case calls into the runtime to complete the store without causing |
925 // an IC miss that would otherwise cause a transition to the generic stub. | 925 // an IC miss that would otherwise cause a transition to the generic stub. |
926 ExternalReference ref = | 926 ExternalReference ref = |
927 ExternalReference(IC_Utility(kKeyedStoreIC_Slow), masm->isolate()); | 927 ExternalReference(IC_Utility(kKeyedStoreIC_Slow), masm->isolate()); |
928 __ TailCallExternalReference(ref, 3, 1); | 928 __ TailCallExternalReference(ref, 3, 1); |
929 } | 929 } |
930 | 930 |
931 | 931 |
932 void KeyedStoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm, | 932 void KeyedStoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm, |
933 StrictModeFlag strict_mode) { | 933 StrictMode strict_mode) { |
934 ASM_LOCATION("KeyedStoreIC::GenerateRuntimeSetProperty"); | 934 ASM_LOCATION("KeyedStoreIC::GenerateRuntimeSetProperty"); |
935 // ---------- S t a t e -------------- | 935 // ---------- S t a t e -------------- |
936 // -- x0 : value | 936 // -- x0 : value |
937 // -- x1 : key | 937 // -- x1 : key |
938 // -- x2 : receiver | 938 // -- x2 : receiver |
939 // -- lr : return address | 939 // -- lr : return address |
940 // ----------------------------------- | 940 // ----------------------------------- |
941 | 941 |
942 // Push receiver, key and value for runtime call. | 942 // Push receiver, key and value for runtime call. |
943 __ Push(x2, x1, x0); | 943 __ Push(x2, x1, x0); |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1107 slow); | 1107 slow); |
1108 ASSERT(receiver_map.Is(x3)); // Transition code expects map in x3. | 1108 ASSERT(receiver_map.Is(x3)); // Transition code expects map in x3. |
1109 mode = AllocationSite::GetMode(FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS); | 1109 mode = AllocationSite::GetMode(FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS); |
1110 ElementsTransitionGenerator::GenerateDoubleToObject(masm, mode, slow); | 1110 ElementsTransitionGenerator::GenerateDoubleToObject(masm, mode, slow); |
1111 __ Ldr(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); | 1111 __ Ldr(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); |
1112 __ B(&finish_store); | 1112 __ B(&finish_store); |
1113 } | 1113 } |
1114 | 1114 |
1115 | 1115 |
1116 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm, | 1116 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm, |
1117 StrictModeFlag strict_mode) { | 1117 StrictMode strict_mode) { |
1118 ASM_LOCATION("KeyedStoreIC::GenerateGeneric"); | 1118 ASM_LOCATION("KeyedStoreIC::GenerateGeneric"); |
1119 // ---------- S t a t e -------------- | 1119 // ---------- S t a t e -------------- |
1120 // -- x0 : value | 1120 // -- x0 : value |
1121 // -- x1 : key | 1121 // -- x1 : key |
1122 // -- x2 : receiver | 1122 // -- x2 : receiver |
1123 // -- lr : return address | 1123 // -- lr : return address |
1124 // ----------------------------------- | 1124 // ----------------------------------- |
1125 Label slow; | 1125 Label slow; |
1126 Label array; | 1126 Label array; |
1127 Label fast_object; | 1127 Label fast_object; |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1273 __ Ret(); | 1273 __ Ret(); |
1274 | 1274 |
1275 // Cache miss: Jump to runtime. | 1275 // Cache miss: Jump to runtime. |
1276 __ Bind(&miss); | 1276 __ Bind(&miss); |
1277 __ IncrementCounter(counters->store_normal_miss(), 1, x4, x5); | 1277 __ IncrementCounter(counters->store_normal_miss(), 1, x4, x5); |
1278 GenerateMiss(masm); | 1278 GenerateMiss(masm); |
1279 } | 1279 } |
1280 | 1280 |
1281 | 1281 |
1282 void StoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm, | 1282 void StoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm, |
1283 StrictModeFlag strict_mode) { | 1283 StrictMode strict_mode) { |
1284 ASM_LOCATION("StoreIC::GenerateRuntimeSetProperty"); | 1284 ASM_LOCATION("StoreIC::GenerateRuntimeSetProperty"); |
1285 // ----------- S t a t e ------------- | 1285 // ----------- S t a t e ------------- |
1286 // -- x0 : value | 1286 // -- x0 : value |
1287 // -- x1 : receiver | 1287 // -- x1 : receiver |
1288 // -- x2 : name | 1288 // -- x2 : name |
1289 // -- lr : return address | 1289 // -- lr : return address |
1290 // ----------------------------------- | 1290 // ----------------------------------- |
1291 | 1291 |
1292 __ Push(x1, x2, x0); | 1292 __ Push(x1, x2, x0); |
1293 | 1293 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1404 ASSERT(to_patch->Mask(TestBranchMask) == TBNZ); | 1404 ASSERT(to_patch->Mask(TestBranchMask) == TBNZ); |
1405 // This is JumpIfSmi(smi_reg, branch_imm). | 1405 // This is JumpIfSmi(smi_reg, branch_imm). |
1406 patcher.tbz(smi_reg, 0, branch_imm); | 1406 patcher.tbz(smi_reg, 0, branch_imm); |
1407 } | 1407 } |
1408 } | 1408 } |
1409 | 1409 |
1410 | 1410 |
1411 } } // namespace v8::internal | 1411 } } // namespace v8::internal |
1412 | 1412 |
1413 #endif // V8_TARGET_ARCH_A64 | 1413 #endif // V8_TARGET_ARCH_A64 |
OLD | NEW |