| 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 1371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1382 // -- edx : receiver | 1382 // -- edx : receiver |
| 1383 // -- esp[0] : return address | 1383 // -- esp[0] : return address |
| 1384 // ----------------------------------- | 1384 // ----------------------------------- |
| 1385 | 1385 |
| 1386 Code::Flags flags = Code::ComputeFlags(Code::STORE_IC, | 1386 Code::Flags flags = Code::ComputeFlags(Code::STORE_IC, |
| 1387 NOT_IN_LOOP, | 1387 NOT_IN_LOOP, |
| 1388 MONOMORPHIC); | 1388 MONOMORPHIC); |
| 1389 StubCache::GenerateProbe(masm, flags, edx, ecx, ebx, no_reg); | 1389 StubCache::GenerateProbe(masm, flags, edx, ecx, ebx, no_reg); |
| 1390 | 1390 |
| 1391 // Cache miss: Jump to runtime. | 1391 // Cache miss: Jump to runtime. |
| 1392 Generate(masm, ExternalReference(IC_Utility(kStoreIC_Miss))); | 1392 GenerateMiss(masm); |
| 1393 } | 1393 } |
| 1394 | 1394 |
| 1395 | 1395 |
| 1396 void StoreIC::GenerateExtendStorage(MacroAssembler* masm) { | 1396 void StoreIC::GenerateExtendStorage(MacroAssembler* masm) { |
| 1397 // ----------- S t a t e ------------- | 1397 // ----------- S t a t e ------------- |
| 1398 // -- eax : value | 1398 // -- eax : value |
| 1399 // -- ecx : transition map | 1399 // -- ecx : transition map |
| 1400 // -- edx : receiver | 1400 // -- edx : receiver |
| 1401 // -- esp[0] : return address | 1401 // -- esp[0] : return address |
| 1402 // ----------------------------------- | 1402 // ----------------------------------- |
| 1403 | 1403 |
| 1404 __ pop(ebx); | 1404 __ pop(ebx); |
| 1405 __ push(edx); // receiver | 1405 __ push(edx); // receiver |
| 1406 __ push(ecx); // transition map | 1406 __ push(ecx); // transition map |
| 1407 __ push(eax); // value | 1407 __ push(eax); // value |
| 1408 __ push(ebx); // return address | 1408 __ push(ebx); // return address |
| 1409 | 1409 |
| 1410 // Perform tail call to the entry. | 1410 // Perform tail call to the entry. |
| 1411 __ TailCallRuntime( | 1411 __ TailCallRuntime( |
| 1412 ExternalReference(IC_Utility(kSharedStoreIC_ExtendStorage)), 3, 1); | 1412 ExternalReference(IC_Utility(kSharedStoreIC_ExtendStorage)), 3, 1); |
| 1413 } | 1413 } |
| 1414 | 1414 |
| 1415 | 1415 |
| 1416 void StoreIC::Generate(MacroAssembler* masm, const ExternalReference& f) { | 1416 void StoreIC::GenerateMiss(MacroAssembler* masm) { |
| 1417 // ----------- S t a t e ------------- | 1417 // ----------- S t a t e ------------- |
| 1418 // -- eax : value | 1418 // -- eax : value |
| 1419 // -- ecx : name | 1419 // -- ecx : name |
| 1420 // -- edx : receiver | 1420 // -- edx : receiver |
| 1421 // -- esp[0] : return address | 1421 // -- esp[0] : return address |
| 1422 // ----------------------------------- | 1422 // ----------------------------------- |
| 1423 | 1423 |
| 1424 __ pop(ebx); | 1424 __ pop(ebx); |
| 1425 __ push(edx); | 1425 __ push(edx); |
| 1426 __ push(ecx); | 1426 __ push(ecx); |
| 1427 __ push(eax); | 1427 __ push(eax); |
| 1428 __ push(ebx); | 1428 __ push(ebx); |
| 1429 | 1429 |
| 1430 // Perform tail call to the entry. | 1430 // Perform tail call to the entry. |
| 1431 __ TailCallRuntime(f, 3, 1); | 1431 __ TailCallRuntime(ExternalReference(IC_Utility(kStoreIC_Miss)), 3, 1); |
| 1432 } | 1432 } |
| 1433 | 1433 |
| 1434 | 1434 |
| 1435 // Defined in ic.cc. | 1435 // Defined in ic.cc. |
| 1436 Object* KeyedStoreIC_Miss(Arguments args); | 1436 Object* KeyedStoreIC_Miss(Arguments args); |
| 1437 | 1437 |
| 1438 void KeyedStoreIC::Generate(MacroAssembler* masm, const ExternalReference& f) { | 1438 void KeyedStoreIC::Generate(MacroAssembler* masm, const ExternalReference& f) { |
| 1439 // ----------- S t a t e ------------- | 1439 // ----------- S t a t e ------------- |
| 1440 // -- eax : value | 1440 // -- eax : value |
| 1441 // -- esp[0] : return address | 1441 // -- esp[0] : return address |
| (...skipping 29 matching lines...) Expand all Loading... |
| 1471 | 1471 |
| 1472 // Do tail-call to runtime routine. | 1472 // Do tail-call to runtime routine. |
| 1473 __ TailCallRuntime( | 1473 __ TailCallRuntime( |
| 1474 ExternalReference(IC_Utility(kSharedStoreIC_ExtendStorage)), 3, 1); | 1474 ExternalReference(IC_Utility(kSharedStoreIC_ExtendStorage)), 3, 1); |
| 1475 } | 1475 } |
| 1476 | 1476 |
| 1477 #undef __ | 1477 #undef __ |
| 1478 | 1478 |
| 1479 | 1479 |
| 1480 } } // namespace v8::internal | 1480 } } // namespace v8::internal |
| OLD | NEW |