| 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 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1313 // Used from ic_<arch>.cc. | 1313 // Used from ic_<arch>.cc. |
| 1314 Object* LoadIC_Miss(Arguments args) { | 1314 Object* LoadIC_Miss(Arguments args) { |
| 1315 NoHandleAllocation na; | 1315 NoHandleAllocation na; |
| 1316 ASSERT(args.length() == 2); | 1316 ASSERT(args.length() == 2); |
| 1317 LoadIC ic; | 1317 LoadIC ic; |
| 1318 IC::State state = IC::StateFrom(ic.target(), args[0]); | 1318 IC::State state = IC::StateFrom(ic.target(), args[0]); |
| 1319 return ic.Load(state, args.at<Object>(0), args.at<String>(1)); | 1319 return ic.Load(state, args.at<Object>(0), args.at<String>(1)); |
| 1320 } | 1320 } |
| 1321 | 1321 |
| 1322 | 1322 |
| 1323 void LoadIC::GenerateInitialize(MacroAssembler* masm) { | |
| 1324 Generate(masm, ExternalReference(IC_Utility(kLoadIC_Miss))); | |
| 1325 } | |
| 1326 | |
| 1327 | |
| 1328 void LoadIC::GeneratePreMonomorphic(MacroAssembler* masm) { | |
| 1329 Generate(masm, ExternalReference(IC_Utility(kLoadIC_Miss))); | |
| 1330 } | |
| 1331 | |
| 1332 | |
| 1333 // Used from ic_<arch>.cc | 1323 // Used from ic_<arch>.cc |
| 1334 Object* KeyedLoadIC_Miss(Arguments args) { | 1324 Object* KeyedLoadIC_Miss(Arguments args) { |
| 1335 NoHandleAllocation na; | 1325 NoHandleAllocation na; |
| 1336 ASSERT(args.length() == 2); | 1326 ASSERT(args.length() == 2); |
| 1337 KeyedLoadIC ic; | 1327 KeyedLoadIC ic; |
| 1338 IC::State state = IC::StateFrom(ic.target(), args[0]); | 1328 IC::State state = IC::StateFrom(ic.target(), args[0]); |
| 1339 return ic.Load(state, args.at<Object>(0), args.at<Object>(1)); | 1329 return ic.Load(state, args.at<Object>(0), args.at<Object>(1)); |
| 1340 } | 1330 } |
| 1341 | 1331 |
| 1342 | 1332 |
| 1343 void KeyedLoadIC::GenerateInitialize(MacroAssembler* masm) { | |
| 1344 Generate(masm, ExternalReference(IC_Utility(kKeyedLoadIC_Miss))); | |
| 1345 } | |
| 1346 | |
| 1347 | |
| 1348 void KeyedLoadIC::GeneratePreMonomorphic(MacroAssembler* masm) { | |
| 1349 Generate(masm, ExternalReference(IC_Utility(kKeyedLoadIC_Miss))); | |
| 1350 } | |
| 1351 | |
| 1352 | |
| 1353 // Used from ic_<arch>.cc. | 1333 // Used from ic_<arch>.cc. |
| 1354 Object* StoreIC_Miss(Arguments args) { | 1334 Object* StoreIC_Miss(Arguments args) { |
| 1355 NoHandleAllocation na; | 1335 NoHandleAllocation na; |
| 1356 ASSERT(args.length() == 3); | 1336 ASSERT(args.length() == 3); |
| 1357 StoreIC ic; | 1337 StoreIC ic; |
| 1358 IC::State state = IC::StateFrom(ic.target(), args[0]); | 1338 IC::State state = IC::StateFrom(ic.target(), args[0]); |
| 1359 return ic.Store(state, args.at<Object>(0), args.at<String>(1), | 1339 return ic.Store(state, args.at<Object>(0), args.at<String>(1), |
| 1360 args.at<Object>(2)); | 1340 args.at<Object>(2)); |
| 1361 } | 1341 } |
| 1362 | 1342 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1399 Object* KeyedStoreIC_Miss(Arguments args) { | 1379 Object* KeyedStoreIC_Miss(Arguments args) { |
| 1400 NoHandleAllocation na; | 1380 NoHandleAllocation na; |
| 1401 ASSERT(args.length() == 3); | 1381 ASSERT(args.length() == 3); |
| 1402 KeyedStoreIC ic; | 1382 KeyedStoreIC ic; |
| 1403 IC::State state = IC::StateFrom(ic.target(), args[0]); | 1383 IC::State state = IC::StateFrom(ic.target(), args[0]); |
| 1404 return ic.Store(state, args.at<Object>(0), args.at<Object>(1), | 1384 return ic.Store(state, args.at<Object>(0), args.at<Object>(1), |
| 1405 args.at<Object>(2)); | 1385 args.at<Object>(2)); |
| 1406 } | 1386 } |
| 1407 | 1387 |
| 1408 | 1388 |
| 1409 void KeyedStoreIC::GenerateInitialize(MacroAssembler* masm) { | |
| 1410 Generate(masm, ExternalReference(IC_Utility(kKeyedStoreIC_Miss))); | |
| 1411 } | |
| 1412 | |
| 1413 | |
| 1414 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { | |
| 1415 Generate(masm, ExternalReference(IC_Utility(kKeyedStoreIC_Miss))); | |
| 1416 } | |
| 1417 | |
| 1418 | |
| 1419 static Address IC_utilities[] = { | 1389 static Address IC_utilities[] = { |
| 1420 #define ADDR(name) FUNCTION_ADDR(name), | 1390 #define ADDR(name) FUNCTION_ADDR(name), |
| 1421 IC_UTIL_LIST(ADDR) | 1391 IC_UTIL_LIST(ADDR) |
| 1422 NULL | 1392 NULL |
| 1423 #undef ADDR | 1393 #undef ADDR |
| 1424 }; | 1394 }; |
| 1425 | 1395 |
| 1426 | 1396 |
| 1427 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 1397 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
| 1428 return IC_utilities[id]; | 1398 return IC_utilities[id]; |
| 1429 } | 1399 } |
| 1430 | 1400 |
| 1431 | 1401 |
| 1432 } } // namespace v8::internal | 1402 } } // namespace v8::internal |
| OLD | NEW |