| 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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 Code::Kind kind, | 388 Code::Kind kind, |
| 389 Code::ExtraICState extra_ic_state) { | 389 Code::ExtraICState extra_ic_state) { |
| 390 // ----------- S t a t e ------------- | 390 // ----------- S t a t e ------------- |
| 391 // -- a1 : receiver | 391 // -- a1 : receiver |
| 392 // -- a2 : name | 392 // -- a2 : name |
| 393 // ----------------------------------- | 393 // ----------------------------------- |
| 394 Label number, non_number, non_string, boolean, probe, miss; | 394 Label number, non_number, non_string, boolean, probe, miss; |
| 395 | 395 |
| 396 // Probe the stub cache. | 396 // Probe the stub cache. |
| 397 Code::Flags flags = Code::ComputeFlags(kind, | 397 Code::Flags flags = Code::ComputeFlags(kind, |
| 398 NOT_IN_LOOP, |
| 398 MONOMORPHIC, | 399 MONOMORPHIC, |
| 399 extra_ic_state, | 400 extra_ic_state, |
| 400 NORMAL, | 401 NORMAL, |
| 401 argc); | 402 argc); |
| 402 Isolate::Current()->stub_cache()->GenerateProbe( | 403 Isolate::Current()->stub_cache()->GenerateProbe( |
| 403 masm, flags, a1, a2, a3, t0, t1); | 404 masm, flags, a1, a2, a3, t0, t1); |
| 404 | 405 |
| 405 // If the stub cache probing failed, the receiver might be a value. | 406 // If the stub cache probing failed, the receiver might be a value. |
| 406 // For value objects, we use the map of the prototype objects for | 407 // For value objects, we use the map of the prototype objects for |
| 407 // the corresponding JSValue for the cache and that is what we need | 408 // the corresponding JSValue for the cache and that is what we need |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 724 | 725 |
| 725 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { | 726 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { |
| 726 // ----------- S t a t e ------------- | 727 // ----------- S t a t e ------------- |
| 727 // -- a2 : name | 728 // -- a2 : name |
| 728 // -- ra : return address | 729 // -- ra : return address |
| 729 // -- a0 : receiver | 730 // -- a0 : receiver |
| 730 // -- sp[0] : receiver | 731 // -- sp[0] : receiver |
| 731 // ----------------------------------- | 732 // ----------------------------------- |
| 732 | 733 |
| 733 // Probe the stub cache. | 734 // Probe the stub cache. |
| 734 Code::Flags flags = Code::ComputeFlags(Code::LOAD_IC, MONOMORPHIC); | 735 Code::Flags flags = Code::ComputeFlags(Code::LOAD_IC, |
| 736 NOT_IN_LOOP, |
| 737 MONOMORPHIC); |
| 735 Isolate::Current()->stub_cache()->GenerateProbe( | 738 Isolate::Current()->stub_cache()->GenerateProbe( |
| 736 masm, flags, a0, a2, a3, t0, t1); | 739 masm, flags, a0, a2, a3, t0, t1); |
| 737 | 740 |
| 738 // Cache miss: Jump to runtime. | 741 // Cache miss: Jump to runtime. |
| 739 GenerateMiss(masm); | 742 GenerateMiss(masm); |
| 740 } | 743 } |
| 741 | 744 |
| 742 | 745 |
| 743 void LoadIC::GenerateNormal(MacroAssembler* masm) { | 746 void LoadIC::GenerateNormal(MacroAssembler* masm) { |
| 744 // ----------- S t a t e ------------- | 747 // ----------- S t a t e ------------- |
| (...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1385 void StoreIC::GenerateMegamorphic(MacroAssembler* masm, | 1388 void StoreIC::GenerateMegamorphic(MacroAssembler* masm, |
| 1386 StrictModeFlag strict_mode) { | 1389 StrictModeFlag strict_mode) { |
| 1387 // ----------- S t a t e ------------- | 1390 // ----------- S t a t e ------------- |
| 1388 // -- a0 : value | 1391 // -- a0 : value |
| 1389 // -- a1 : receiver | 1392 // -- a1 : receiver |
| 1390 // -- a2 : name | 1393 // -- a2 : name |
| 1391 // -- ra : return address | 1394 // -- ra : return address |
| 1392 // ----------------------------------- | 1395 // ----------------------------------- |
| 1393 | 1396 |
| 1394 // Get the receiver from the stack and probe the stub cache. | 1397 // Get the receiver from the stack and probe the stub cache. |
| 1395 Code::Flags flags = | 1398 Code::Flags flags = Code::ComputeFlags(Code::STORE_IC, |
| 1396 Code::ComputeFlags(Code::STORE_IC, MONOMORPHIC, strict_mode); | 1399 NOT_IN_LOOP, |
| 1400 MONOMORPHIC, |
| 1401 strict_mode); |
| 1397 Isolate::Current()->stub_cache()->GenerateProbe( | 1402 Isolate::Current()->stub_cache()->GenerateProbe( |
| 1398 masm, flags, a1, a2, a3, t0, t1); | 1403 masm, flags, a1, a2, a3, t0, t1); |
| 1399 | 1404 |
| 1400 // Cache miss: Jump to runtime. | 1405 // Cache miss: Jump to runtime. |
| 1401 GenerateMiss(masm); | 1406 GenerateMiss(masm); |
| 1402 } | 1407 } |
| 1403 | 1408 |
| 1404 | 1409 |
| 1405 void StoreIC::GenerateMiss(MacroAssembler* masm) { | 1410 void StoreIC::GenerateMiss(MacroAssembler* masm) { |
| 1406 // ----------- S t a t e ------------- | 1411 // ----------- S t a t e ------------- |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1626 Register reg = Register::from_code(Assembler::GetRs(instr_at_patch)); | 1631 Register reg = Register::from_code(Assembler::GetRs(instr_at_patch)); |
| 1627 patcher.masm()->andi(at, reg, kSmiTagMask); | 1632 patcher.masm()->andi(at, reg, kSmiTagMask); |
| 1628 patcher.ChangeBranchCondition(eq); | 1633 patcher.ChangeBranchCondition(eq); |
| 1629 } | 1634 } |
| 1630 } | 1635 } |
| 1631 | 1636 |
| 1632 | 1637 |
| 1633 } } // namespace v8::internal | 1638 } } // namespace v8::internal |
| 1634 | 1639 |
| 1635 #endif // V8_TARGET_ARCH_MIPS | 1640 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |