OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 1347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1358 } | 1358 } |
1359 | 1359 |
1360 | 1360 |
1361 Object* StoreIC_ArrayLength(Arguments args) { | 1361 Object* StoreIC_ArrayLength(Arguments args) { |
1362 NoHandleAllocation nha; | 1362 NoHandleAllocation nha; |
1363 | 1363 |
1364 ASSERT(args.length() == 2); | 1364 ASSERT(args.length() == 2); |
1365 JSObject* receiver = JSObject::cast(args[0]); | 1365 JSObject* receiver = JSObject::cast(args[0]); |
1366 Object* len = args[1]; | 1366 Object* len = args[1]; |
1367 | 1367 |
1368 return receiver->SetElementsLength(len); | 1368 Object* result = receiver->SetElementsLength(len); |
| 1369 if (result->IsFailure()) return result; |
| 1370 return len; |
1369 } | 1371 } |
1370 | 1372 |
1371 | 1373 |
1372 // Extend storage is called in a store inline cache when | 1374 // Extend storage is called in a store inline cache when |
1373 // it is necessary to extend the properties array of a | 1375 // it is necessary to extend the properties array of a |
1374 // JSObject. | 1376 // JSObject. |
1375 Object* SharedStoreIC_ExtendStorage(Arguments args) { | 1377 Object* SharedStoreIC_ExtendStorage(Arguments args) { |
1376 NoHandleAllocation na; | 1378 NoHandleAllocation na; |
1377 ASSERT(args.length() == 3); | 1379 ASSERT(args.length() == 3); |
1378 | 1380 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1421 #undef ADDR | 1423 #undef ADDR |
1422 }; | 1424 }; |
1423 | 1425 |
1424 | 1426 |
1425 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 1427 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
1426 return IC_utilities[id]; | 1428 return IC_utilities[id]; |
1427 } | 1429 } |
1428 | 1430 |
1429 | 1431 |
1430 } } // namespace v8::internal | 1432 } } // namespace v8::internal |
OLD | NEW |