| 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 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1219 } | 1219 } |
| 1220 | 1220 |
| 1221 | 1221 |
| 1222 void KeyedLoadIC::GenerateString(MacroAssembler* masm) { | 1222 void KeyedLoadIC::GenerateString(MacroAssembler* masm) { |
| 1223 // ---------- S t a t e -------------- | 1223 // ---------- S t a t e -------------- |
| 1224 // -- lr : return address | 1224 // -- lr : return address |
| 1225 // -- r0 : key (index) | 1225 // -- r0 : key (index) |
| 1226 // -- r1 : receiver | 1226 // -- r1 : receiver |
| 1227 // ----------------------------------- | 1227 // ----------------------------------- |
| 1228 Label miss; | 1228 Label miss; |
| 1229 Label index_out_of_range; | |
| 1230 | 1229 |
| 1231 Register receiver = r1; | 1230 Register receiver = r1; |
| 1232 Register index = r0; | 1231 Register index = r0; |
| 1233 Register scratch1 = r2; | 1232 Register scratch1 = r2; |
| 1234 Register scratch2 = r3; | 1233 Register scratch2 = r3; |
| 1235 Register result = r0; | 1234 Register result = r0; |
| 1236 | 1235 |
| 1237 StringCharAtGenerator char_at_generator(receiver, | 1236 StringCharAtGenerator char_at_generator(receiver, |
| 1238 index, | 1237 index, |
| 1239 scratch1, | 1238 scratch1, |
| 1240 scratch2, | 1239 scratch2, |
| 1241 result, | 1240 result, |
| 1242 &miss, // When not a string. | 1241 &miss, // When not a string. |
| 1243 &miss, // When not a number. | 1242 &miss, // When not a number. |
| 1244 &index_out_of_range, | 1243 &miss, // When index out of range. |
| 1245 STRING_INDEX_IS_ARRAY_INDEX); | 1244 STRING_INDEX_IS_ARRAY_INDEX); |
| 1246 char_at_generator.GenerateFast(masm); | 1245 char_at_generator.GenerateFast(masm); |
| 1247 __ Ret(); | 1246 __ Ret(); |
| 1248 | 1247 |
| 1249 ICRuntimeCallHelper call_helper; | 1248 ICRuntimeCallHelper call_helper; |
| 1250 char_at_generator.GenerateSlow(masm, call_helper); | 1249 char_at_generator.GenerateSlow(masm, call_helper); |
| 1251 | 1250 |
| 1252 __ bind(&index_out_of_range); | |
| 1253 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex); | |
| 1254 __ Ret(); | |
| 1255 | |
| 1256 __ bind(&miss); | 1251 __ bind(&miss); |
| 1257 GenerateMiss(masm); | 1252 GenerateMiss(masm); |
| 1258 } | 1253 } |
| 1259 | 1254 |
| 1260 | 1255 |
| 1261 // Convert unsigned integer with specified number of leading zeroes in binary | 1256 // Convert unsigned integer with specified number of leading zeroes in binary |
| 1262 // representation to IEEE 754 double. | 1257 // representation to IEEE 754 double. |
| 1263 // Integer to convert is passed in register hiword. | 1258 // Integer to convert is passed in register hiword. |
| 1264 // Resulting double is returned in registers hiword:loword. | 1259 // Resulting double is returned in registers hiword:loword. |
| 1265 // This functions does not work correctly for 0. | 1260 // This functions does not work correctly for 0. |
| (...skipping 972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2238 GenerateMiss(masm); | 2233 GenerateMiss(masm); |
| 2239 } | 2234 } |
| 2240 | 2235 |
| 2241 | 2236 |
| 2242 #undef __ | 2237 #undef __ |
| 2243 | 2238 |
| 2244 | 2239 |
| 2245 } } // namespace v8::internal | 2240 } } // namespace v8::internal |
| 2246 | 2241 |
| 2247 #endif // V8_TARGET_ARCH_ARM | 2242 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |