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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 Code::Kind kind, | 386 Code::Kind kind, |
387 Code::ExtraICState extra_ic_state) { | 387 Code::ExtraICState extra_ic_state) { |
388 // ----------- S t a t e ------------- | 388 // ----------- S t a t e ------------- |
389 // -- r1 : receiver | 389 // -- r1 : receiver |
390 // -- r2 : name | 390 // -- r2 : name |
391 // ----------------------------------- | 391 // ----------------------------------- |
392 Label number, non_number, non_string, boolean, probe, miss; | 392 Label number, non_number, non_string, boolean, probe, miss; |
393 | 393 |
394 // Probe the stub cache. | 394 // Probe the stub cache. |
395 Code::Flags flags = Code::ComputeFlags(kind, | 395 Code::Flags flags = Code::ComputeFlags(kind, |
396 NOT_IN_LOOP, | |
397 MONOMORPHIC, | 396 MONOMORPHIC, |
398 extra_ic_state, | 397 extra_ic_state, |
399 NORMAL, | 398 NORMAL, |
400 argc); | 399 argc); |
401 Isolate::Current()->stub_cache()->GenerateProbe( | 400 Isolate::Current()->stub_cache()->GenerateProbe( |
402 masm, flags, r1, r2, r3, r4, r5); | 401 masm, flags, r1, r2, r3, r4, r5); |
403 | 402 |
404 // If the stub cache probing failed, the receiver might be a value. | 403 // If the stub cache probing failed, the receiver might be a value. |
405 // For value objects, we use the map of the prototype objects for | 404 // For value objects, we use the map of the prototype objects for |
406 // the corresponding JSValue for the cache and that is what we need | 405 // the corresponding JSValue for the cache and that is what we need |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
727 | 726 |
728 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { | 727 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { |
729 // ----------- S t a t e ------------- | 728 // ----------- S t a t e ------------- |
730 // -- r2 : name | 729 // -- r2 : name |
731 // -- lr : return address | 730 // -- lr : return address |
732 // -- r0 : receiver | 731 // -- r0 : receiver |
733 // -- sp[0] : receiver | 732 // -- sp[0] : receiver |
734 // ----------------------------------- | 733 // ----------------------------------- |
735 | 734 |
736 // Probe the stub cache. | 735 // Probe the stub cache. |
737 Code::Flags flags = Code::ComputeFlags(Code::LOAD_IC, | 736 Code::Flags flags = |
738 NOT_IN_LOOP, | 737 Code::ComputeFlags(Code::LOAD_IC, MONOMORPHIC); |
739 MONOMORPHIC); | |
740 Isolate::Current()->stub_cache()->GenerateProbe( | 738 Isolate::Current()->stub_cache()->GenerateProbe( |
741 masm, flags, r0, r2, r3, r4, r5); | 739 masm, flags, r0, r2, r3, r4, r5); |
742 | 740 |
743 // Cache miss: Jump to runtime. | 741 // Cache miss: Jump to runtime. |
744 GenerateMiss(masm); | 742 GenerateMiss(masm); |
745 } | 743 } |
746 | 744 |
747 | 745 |
748 void LoadIC::GenerateNormal(MacroAssembler* masm) { | 746 void LoadIC::GenerateNormal(MacroAssembler* masm) { |
749 // ----------- S t a t e ------------- | 747 // ----------- S t a t e ------------- |
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1373 void StoreIC::GenerateMegamorphic(MacroAssembler* masm, | 1371 void StoreIC::GenerateMegamorphic(MacroAssembler* masm, |
1374 StrictModeFlag strict_mode) { | 1372 StrictModeFlag strict_mode) { |
1375 // ----------- S t a t e ------------- | 1373 // ----------- S t a t e ------------- |
1376 // -- r0 : value | 1374 // -- r0 : value |
1377 // -- r1 : receiver | 1375 // -- r1 : receiver |
1378 // -- r2 : name | 1376 // -- r2 : name |
1379 // -- lr : return address | 1377 // -- lr : return address |
1380 // ----------------------------------- | 1378 // ----------------------------------- |
1381 | 1379 |
1382 // Get the receiver from the stack and probe the stub cache. | 1380 // Get the receiver from the stack and probe the stub cache. |
1383 Code::Flags flags = Code::ComputeFlags(Code::STORE_IC, | 1381 Code::Flags flags = |
1384 NOT_IN_LOOP, | 1382 Code::ComputeFlags(Code::STORE_IC, MONOMORPHIC, strict_mode); |
1385 MONOMORPHIC, | |
1386 strict_mode); | |
1387 | 1383 |
1388 Isolate::Current()->stub_cache()->GenerateProbe( | 1384 Isolate::Current()->stub_cache()->GenerateProbe( |
1389 masm, flags, r1, r2, r3, r4, r5); | 1385 masm, flags, r1, r2, r3, r4, r5); |
1390 | 1386 |
1391 // Cache miss: Jump to runtime. | 1387 // Cache miss: Jump to runtime. |
1392 GenerateMiss(masm); | 1388 GenerateMiss(masm); |
1393 } | 1389 } |
1394 | 1390 |
1395 | 1391 |
1396 void StoreIC::GenerateMiss(MacroAssembler* masm) { | 1392 void StoreIC::GenerateMiss(MacroAssembler* masm) { |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1621 Register reg = Assembler::GetRn(instr_at_patch); | 1617 Register reg = Assembler::GetRn(instr_at_patch); |
1622 patcher.masm()->tst(reg, Operand(kSmiTagMask)); | 1618 patcher.masm()->tst(reg, Operand(kSmiTagMask)); |
1623 patcher.EmitCondition(eq); | 1619 patcher.EmitCondition(eq); |
1624 } | 1620 } |
1625 } | 1621 } |
1626 | 1622 |
1627 | 1623 |
1628 } } // namespace v8::internal | 1624 } } // namespace v8::internal |
1629 | 1625 |
1630 #endif // V8_TARGET_ARCH_ARM | 1626 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |