Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(383)

Side by Side Diff: src/arm/ic-arm.cc

Issue 3410011: Fix a regression in character-at stub when doing a keyed load on a string. ... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/ia32/ic-ia32.cc » ('j') | test/mjsunit/regress/regress-900966.js » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | src/ia32/ic-ia32.cc » ('j') | test/mjsunit/regress/regress-900966.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698