| 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 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1113 void KeyedLoadIC::GenerateString(MacroAssembler* masm) { | 1113 void KeyedLoadIC::GenerateString(MacroAssembler* masm) { |
| 1114 // ---------- S t a t e -------------- | 1114 // ---------- S t a t e -------------- |
| 1115 // -- ra : return address | 1115 // -- ra : return address |
| 1116 // -- a0 : key (index) | 1116 // -- a0 : key (index) |
| 1117 // -- a1 : receiver | 1117 // -- a1 : receiver |
| 1118 // ----------------------------------- | 1118 // ----------------------------------- |
| 1119 Label miss; | 1119 Label miss; |
| 1120 | 1120 |
| 1121 Register receiver = a1; | 1121 Register receiver = a1; |
| 1122 Register index = a0; | 1122 Register index = a0; |
| 1123 Register scratch1 = a2; | 1123 Register scratch = a3; |
| 1124 Register scratch2 = a3; | |
| 1125 Register result = v0; | 1124 Register result = v0; |
| 1126 | 1125 |
| 1127 StringCharAtGenerator char_at_generator(receiver, | 1126 StringCharAtGenerator char_at_generator(receiver, |
| 1128 index, | 1127 index, |
| 1129 scratch1, | 1128 scratch, |
| 1130 scratch2, | |
| 1131 result, | 1129 result, |
| 1132 &miss, // When not a string. | 1130 &miss, // When not a string. |
| 1133 &miss, // When not a number. | 1131 &miss, // When not a number. |
| 1134 &miss, // When index out of range. | 1132 &miss, // When index out of range. |
| 1135 STRING_INDEX_IS_ARRAY_INDEX); | 1133 STRING_INDEX_IS_ARRAY_INDEX); |
| 1136 char_at_generator.GenerateFast(masm); | 1134 char_at_generator.GenerateFast(masm); |
| 1137 __ Ret(); | 1135 __ Ret(); |
| 1138 | 1136 |
| 1139 StubRuntimeCallHelper call_helper; | 1137 StubRuntimeCallHelper call_helper; |
| 1140 char_at_generator.GenerateSlow(masm, call_helper); | 1138 char_at_generator.GenerateSlow(masm, call_helper); |
| (...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1671 Register reg = Register::from_code(Assembler::GetRs(instr_at_patch)); | 1669 Register reg = Register::from_code(Assembler::GetRs(instr_at_patch)); |
| 1672 patcher.masm()->andi(at, reg, kSmiTagMask); | 1670 patcher.masm()->andi(at, reg, kSmiTagMask); |
| 1673 patcher.ChangeBranchCondition(eq); | 1671 patcher.ChangeBranchCondition(eq); |
| 1674 } | 1672 } |
| 1675 } | 1673 } |
| 1676 | 1674 |
| 1677 | 1675 |
| 1678 } } // namespace v8::internal | 1676 } } // namespace v8::internal |
| 1679 | 1677 |
| 1680 #endif // V8_TARGET_ARCH_MIPS | 1678 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |