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 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 | 428 |
429 void LoadIC::GenerateMegamorphic(MacroAssembler* masm, | 429 void LoadIC::GenerateMegamorphic(MacroAssembler* masm, |
430 ExtraICState extra_state) { | 430 ExtraICState extra_state) { |
431 // ----------- S t a t e ------------- | 431 // ----------- S t a t e ------------- |
432 // -- x2 : name | 432 // -- x2 : name |
433 // -- lr : return address | 433 // -- lr : return address |
434 // -- x0 : receiver | 434 // -- x0 : receiver |
435 // ----------------------------------- | 435 // ----------------------------------- |
436 | 436 |
437 // Probe the stub cache. | 437 // Probe the stub cache. |
438 Code::Flags flags = Code::ComputeFlags( | 438 Code::Flags flags = Code::ComputeHandlerFlags(Code::LOAD_IC, extra_state); |
439 Code::HANDLER, MONOMORPHIC, extra_state, | |
440 Code::NORMAL, Code::LOAD_IC); | |
441 masm->isolate()->stub_cache()->GenerateProbe( | 439 masm->isolate()->stub_cache()->GenerateProbe( |
442 masm, flags, x0, x2, x3, x4, x5, x6); | 440 masm, flags, x0, x2, x3, x4, x5, x6); |
443 | 441 |
444 // Cache miss: Jump to runtime. | 442 // Cache miss: Jump to runtime. |
445 GenerateMiss(masm); | 443 GenerateMiss(masm); |
446 } | 444 } |
447 | 445 |
448 | 446 |
449 void LoadIC::GenerateNormal(MacroAssembler* masm) { | 447 void LoadIC::GenerateNormal(MacroAssembler* masm) { |
450 // ----------- S t a t e ------------- | 448 // ----------- S t a t e ------------- |
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1213 value, key, receiver, receiver_map, | 1211 value, key, receiver, receiver_map, |
1214 elements_map, elements); | 1212 elements_map, elements); |
1215 KeyedStoreGenerateGenericHelper(masm, &fast_object_grow, &fast_double_grow, | 1213 KeyedStoreGenerateGenericHelper(masm, &fast_object_grow, &fast_double_grow, |
1216 &slow, kDontCheckMap, kIncrementLength, | 1214 &slow, kDontCheckMap, kIncrementLength, |
1217 value, key, receiver, receiver_map, | 1215 value, key, receiver, receiver_map, |
1218 elements_map, elements); | 1216 elements_map, elements); |
1219 } | 1217 } |
1220 | 1218 |
1221 | 1219 |
1222 void StoreIC::GenerateMegamorphic(MacroAssembler* masm, | 1220 void StoreIC::GenerateMegamorphic(MacroAssembler* masm, |
1223 ExtraICState extra_ic_state) { | 1221 ExtraICState extra_state) { |
1224 // ----------- S t a t e ------------- | 1222 // ----------- S t a t e ------------- |
1225 // -- x0 : value | 1223 // -- x0 : value |
1226 // -- x1 : receiver | 1224 // -- x1 : receiver |
1227 // -- x2 : name | 1225 // -- x2 : name |
1228 // -- lr : return address | 1226 // -- lr : return address |
1229 // ----------------------------------- | 1227 // ----------------------------------- |
1230 | 1228 |
1231 // Probe the stub cache. | 1229 // Probe the stub cache. |
1232 Code::Flags flags = Code::ComputeFlags( | 1230 Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC, extra_state); |
1233 Code::HANDLER, MONOMORPHIC, extra_ic_state, | |
1234 Code::NORMAL, Code::STORE_IC); | |
1235 | 1231 |
1236 masm->isolate()->stub_cache()->GenerateProbe( | 1232 masm->isolate()->stub_cache()->GenerateProbe( |
1237 masm, flags, x1, x2, x3, x4, x5, x6); | 1233 masm, flags, x1, x2, x3, x4, x5, x6); |
1238 | 1234 |
1239 // Cache miss: Jump to runtime. | 1235 // Cache miss: Jump to runtime. |
1240 GenerateMiss(masm); | 1236 GenerateMiss(masm); |
1241 } | 1237 } |
1242 | 1238 |
1243 | 1239 |
1244 void StoreIC::GenerateMiss(MacroAssembler* masm) { | 1240 void StoreIC::GenerateMiss(MacroAssembler* masm) { |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1411 ASSERT(to_patch->Mask(TestBranchMask) == TBNZ); | 1407 ASSERT(to_patch->Mask(TestBranchMask) == TBNZ); |
1412 // This is JumpIfSmi(smi_reg, branch_imm). | 1408 // This is JumpIfSmi(smi_reg, branch_imm). |
1413 patcher.tbz(smi_reg, 0, branch_imm); | 1409 patcher.tbz(smi_reg, 0, branch_imm); |
1414 } | 1410 } |
1415 } | 1411 } |
1416 | 1412 |
1417 | 1413 |
1418 } } // namespace v8::internal | 1414 } } // namespace v8::internal |
1419 | 1415 |
1420 #endif // V8_TARGET_ARCH_A64 | 1416 #endif // V8_TARGET_ARCH_A64 |
OLD | NEW |