| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1229 } | 1229 } |
| 1230 | 1230 |
| 1231 | 1231 |
| 1232 void KeyedLoadIC::GenerateString(MacroAssembler* masm) { | 1232 void KeyedLoadIC::GenerateString(MacroAssembler* masm) { |
| 1233 // ---------- S t a t e -------------- | 1233 // ---------- S t a t e -------------- |
| 1234 // -- lr : return address | 1234 // -- lr : return address |
| 1235 // -- r0 : key (index) | 1235 // -- r0 : key (index) |
| 1236 // -- r1 : receiver | 1236 // -- r1 : receiver |
| 1237 // ----------------------------------- | 1237 // ----------------------------------- |
| 1238 Label miss; | 1238 Label miss; |
| 1239 Label index_out_of_range; | |
| 1240 | 1239 |
| 1241 Register receiver = r1; | 1240 Register receiver = r1; |
| 1242 Register index = r0; | 1241 Register index = r0; |
| 1243 Register scratch1 = r2; | 1242 Register scratch1 = r2; |
| 1244 Register scratch2 = r3; | 1243 Register scratch2 = r3; |
| 1245 Register result = r0; | 1244 Register result = r0; |
| 1246 | 1245 |
| 1247 StringCharAtGenerator char_at_generator(receiver, | 1246 StringCharAtGenerator char_at_generator(receiver, |
| 1248 index, | 1247 index, |
| 1249 scratch1, | 1248 scratch1, |
| 1250 scratch2, | 1249 scratch2, |
| 1251 result, | 1250 result, |
| 1252 &miss, // When not a string. | 1251 &miss, // When not a string. |
| 1253 &miss, // When not a number. | 1252 &miss, // When not a number. |
| 1254 &index_out_of_range, | 1253 &miss, // When index out of range. |
| 1255 STRING_INDEX_IS_ARRAY_INDEX); | 1254 STRING_INDEX_IS_ARRAY_INDEX); |
| 1256 char_at_generator.GenerateFast(masm); | 1255 char_at_generator.GenerateFast(masm); |
| 1257 __ Ret(); | 1256 __ Ret(); |
| 1258 | 1257 |
| 1259 ICRuntimeCallHelper call_helper; | 1258 ICRuntimeCallHelper call_helper; |
| 1260 char_at_generator.GenerateSlow(masm, call_helper); | 1259 char_at_generator.GenerateSlow(masm, call_helper); |
| 1261 | 1260 |
| 1262 __ bind(&index_out_of_range); | |
| 1263 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex); | |
| 1264 __ Ret(); | |
| 1265 | |
| 1266 __ bind(&miss); | 1261 __ bind(&miss); |
| 1267 GenerateMiss(masm); | 1262 GenerateMiss(masm); |
| 1268 } | 1263 } |
| 1269 | 1264 |
| 1270 | 1265 |
| 1271 // Convert unsigned integer with specified number of leading zeroes in binary | 1266 // Convert unsigned integer with specified number of leading zeroes in binary |
| 1272 // representation to IEEE 754 double. | 1267 // representation to IEEE 754 double. |
| 1273 // Integer to convert is passed in register hiword. | 1268 // Integer to convert is passed in register hiword. |
| 1274 // Resulting double is returned in registers hiword:loword. | 1269 // Resulting double is returned in registers hiword:loword. |
| 1275 // This functions does not work correctly for 0. | 1270 // This functions does not work correctly for 0. |
| (...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2247 GenerateMiss(masm); | 2242 GenerateMiss(masm); |
| 2248 } | 2243 } |
| 2249 | 2244 |
| 2250 | 2245 |
| 2251 #undef __ | 2246 #undef __ |
| 2252 | 2247 |
| 2253 | 2248 |
| 2254 } } // namespace v8::internal | 2249 } } // namespace v8::internal |
| 2255 | 2250 |
| 2256 #endif // V8_TARGET_ARCH_ARM | 2251 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |