| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 // -- rsp[8] : name | 218 // -- rsp[8] : name |
| 219 // -- rsp[16] : receiver | 219 // -- rsp[16] : receiver |
| 220 // ----------------------------------- | 220 // ----------------------------------- |
| 221 | 221 |
| 222 __ pop(rbx); | 222 __ pop(rbx); |
| 223 __ push(Operand(rsp, 1 * kPointerSize)); // receiver | 223 __ push(Operand(rsp, 1 * kPointerSize)); // receiver |
| 224 __ push(Operand(rsp, 1 * kPointerSize)); // name | 224 __ push(Operand(rsp, 1 * kPointerSize)); // name |
| 225 __ push(rbx); // return address | 225 __ push(rbx); // return address |
| 226 | 226 |
| 227 // Perform tail call to the entry. | 227 // Perform tail call to the entry. |
| 228 __ TailCallRuntime(ExternalReference(IC_Utility(kKeyedLoadIC_Miss)), 2, 1); | 228 ExternalReference ref = ExternalReference(IC_Utility(kKeyedLoadIC_Miss)); |
| 229 __ TailCallExternalReference(ref, 2, 1); |
| 229 } | 230 } |
| 230 | 231 |
| 231 | 232 |
| 232 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { | 233 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { |
| 233 // ----------- S t a t e ------------- | 234 // ----------- S t a t e ------------- |
| 234 // -- rsp[0] : return address | 235 // -- rsp[0] : return address |
| 235 // -- rsp[8] : name | 236 // -- rsp[8] : name |
| 236 // -- rsp[16] : receiver | 237 // -- rsp[16] : receiver |
| 237 // ----------------------------------- | 238 // ----------------------------------- |
| 238 | 239 |
| 239 __ pop(rbx); | 240 __ pop(rbx); |
| 240 __ push(Operand(rsp, 1 * kPointerSize)); // receiver | 241 __ push(Operand(rsp, 1 * kPointerSize)); // receiver |
| 241 __ push(Operand(rsp, 1 * kPointerSize)); // name | 242 __ push(Operand(rsp, 1 * kPointerSize)); // name |
| 242 __ push(rbx); // return address | 243 __ push(rbx); // return address |
| 243 | 244 |
| 244 // Perform tail call to the entry. | 245 // Perform tail call to the entry. |
| 245 __ TailCallRuntime(ExternalReference(Runtime::kKeyedGetProperty), 2, 1); | 246 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1); |
| 246 } | 247 } |
| 247 | 248 |
| 248 | 249 |
| 249 void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) { | 250 void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) { |
| 250 // ----------- S t a t e ------------- | 251 // ----------- S t a t e ------------- |
| 251 // -- rsp[0] : return address | 252 // -- rsp[0] : return address |
| 252 // -- rsp[8] : name | 253 // -- rsp[8] : name |
| 253 // -- rsp[16] : receiver | 254 // -- rsp[16] : receiver |
| 254 // ----------------------------------- | 255 // ----------------------------------- |
| 255 Label slow, check_string, index_int, index_string; | 256 Label slow, check_string, index_int, index_string; |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 __ cmpb(rdx, Immediate(1 << Map::kHasIndexedInterceptor)); | 585 __ cmpb(rdx, Immediate(1 << Map::kHasIndexedInterceptor)); |
| 585 __ j(not_zero, &slow); | 586 __ j(not_zero, &slow); |
| 586 | 587 |
| 587 // Everything is fine, call runtime. | 588 // Everything is fine, call runtime. |
| 588 __ pop(rdx); | 589 __ pop(rdx); |
| 589 __ push(rcx); // receiver | 590 __ push(rcx); // receiver |
| 590 __ push(rax); // key | 591 __ push(rax); // key |
| 591 __ push(rdx); // return address | 592 __ push(rdx); // return address |
| 592 | 593 |
| 593 // Perform tail call to the entry. | 594 // Perform tail call to the entry. |
| 594 __ TailCallRuntime(ExternalReference( | 595 __ TailCallExternalReference(ExternalReference( |
| 595 IC_Utility(kKeyedLoadPropertyWithInterceptor)), 2, 1); | 596 IC_Utility(kKeyedLoadPropertyWithInterceptor)), 2, 1); |
| 596 | 597 |
| 597 __ bind(&slow); | 598 __ bind(&slow); |
| 598 GenerateMiss(masm); | 599 GenerateMiss(masm); |
| 599 } | 600 } |
| 600 | 601 |
| 601 | 602 |
| 602 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { | 603 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { |
| 603 // ----------- S t a t e ------------- | 604 // ----------- S t a t e ------------- |
| 604 // -- rax : value | 605 // -- rax : value |
| 605 // -- rsp[0] : return address | 606 // -- rsp[0] : return address |
| 606 // -- rsp[8] : key | 607 // -- rsp[8] : key |
| 607 // -- rsp[16] : receiver | 608 // -- rsp[16] : receiver |
| 608 // ----------------------------------- | 609 // ----------------------------------- |
| 609 | 610 |
| 610 __ pop(rcx); | 611 __ pop(rcx); |
| 611 __ push(Operand(rsp, 1 * kPointerSize)); // receiver | 612 __ push(Operand(rsp, 1 * kPointerSize)); // receiver |
| 612 __ push(Operand(rsp, 1 * kPointerSize)); // key | 613 __ push(Operand(rsp, 1 * kPointerSize)); // key |
| 613 __ push(rax); // value | 614 __ push(rax); // value |
| 614 __ push(rcx); // return address | 615 __ push(rcx); // return address |
| 615 | 616 |
| 616 // Do tail-call to runtime routine. | 617 // Do tail-call to runtime routine. |
| 617 __ TailCallRuntime(ExternalReference(IC_Utility(kKeyedStoreIC_Miss)), 3, 1); | 618 ExternalReference ref = ExternalReference(IC_Utility(kKeyedStoreIC_Miss)); |
| 619 __ TailCallExternalReference(ref, 3, 1); |
| 618 } | 620 } |
| 619 | 621 |
| 620 | 622 |
| 621 void KeyedStoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm) { | 623 void KeyedStoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm) { |
| 622 // ----------- S t a t e ------------- | 624 // ----------- S t a t e ------------- |
| 623 // -- rax : value | 625 // -- rax : value |
| 624 // -- rsp[0] : return address | 626 // -- rsp[0] : return address |
| 625 // -- rsp[8] : key | 627 // -- rsp[8] : key |
| 626 // -- rsp[16] : receiver | 628 // -- rsp[16] : receiver |
| 627 // ----------------------------------- | 629 // ----------------------------------- |
| 628 | 630 |
| 629 __ pop(rcx); | 631 __ pop(rcx); |
| 630 __ push(Operand(rsp, 1 * kPointerSize)); // receiver | 632 __ push(Operand(rsp, 1 * kPointerSize)); // receiver |
| 631 __ push(Operand(rsp, 1 * kPointerSize)); // key | 633 __ push(Operand(rsp, 1 * kPointerSize)); // key |
| 632 __ push(rax); // value | 634 __ push(rax); // value |
| 633 __ push(rcx); // return address | 635 __ push(rcx); // return address |
| 634 | 636 |
| 635 // Do tail-call to runtime routine. | 637 // Do tail-call to runtime routine. |
| 636 __ TailCallRuntime(ExternalReference(Runtime::kSetProperty), 3, 1); | 638 __ TailCallRuntime(Runtime::kSetProperty, 3, 1); |
| 637 } | 639 } |
| 638 | 640 |
| 639 | 641 |
| 640 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm) { | 642 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm) { |
| 641 // ----------- S t a t e ------------- | 643 // ----------- S t a t e ------------- |
| 642 // -- rax : value | 644 // -- rax : value |
| 643 // -- rsp[0] : return address | 645 // -- rsp[0] : return address |
| 644 // -- rsp[8] : key | 646 // -- rsp[8] : key |
| 645 // -- rsp[16] : receiver | 647 // -- rsp[16] : receiver |
| 646 // ----------------------------------- | 648 // ----------------------------------- |
| (...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1195 // -- rsp[0] : return address | 1197 // -- rsp[0] : return address |
| 1196 // -- rsp[8] : receiver | 1198 // -- rsp[8] : receiver |
| 1197 // ----------------------------------- | 1199 // ----------------------------------- |
| 1198 | 1200 |
| 1199 __ pop(rbx); | 1201 __ pop(rbx); |
| 1200 __ push(Operand(rsp, 0)); // receiver | 1202 __ push(Operand(rsp, 0)); // receiver |
| 1201 __ push(rcx); // name | 1203 __ push(rcx); // name |
| 1202 __ push(rbx); // return address | 1204 __ push(rbx); // return address |
| 1203 | 1205 |
| 1204 // Perform tail call to the entry. | 1206 // Perform tail call to the entry. |
| 1205 __ TailCallRuntime(ExternalReference(IC_Utility(kLoadIC_Miss)), 2, 1); | 1207 ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss)); |
| 1208 __ TailCallExternalReference(ref, 2, 1); |
| 1206 } | 1209 } |
| 1207 | 1210 |
| 1208 | 1211 |
| 1209 void LoadIC::GenerateArrayLength(MacroAssembler* masm) { | 1212 void LoadIC::GenerateArrayLength(MacroAssembler* masm) { |
| 1210 // ----------- S t a t e ------------- | 1213 // ----------- S t a t e ------------- |
| 1211 // -- rcx : name | 1214 // -- rcx : name |
| 1212 // -- rsp[0] : return address | 1215 // -- rsp[0] : return address |
| 1213 // -- rsp[8] : receiver | 1216 // -- rsp[8] : receiver |
| 1214 // ----------------------------------- | 1217 // ----------------------------------- |
| 1215 Label miss; | 1218 Label miss; |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1356 // -- rsp[0] : return address | 1359 // -- rsp[0] : return address |
| 1357 // ----------------------------------- | 1360 // ----------------------------------- |
| 1358 | 1361 |
| 1359 __ pop(rbx); | 1362 __ pop(rbx); |
| 1360 __ push(rdx); // receiver | 1363 __ push(rdx); // receiver |
| 1361 __ push(rcx); // name | 1364 __ push(rcx); // name |
| 1362 __ push(rax); // value | 1365 __ push(rax); // value |
| 1363 __ push(rbx); // return address | 1366 __ push(rbx); // return address |
| 1364 | 1367 |
| 1365 // Perform tail call to the entry. | 1368 // Perform tail call to the entry. |
| 1366 __ TailCallRuntime(ExternalReference(IC_Utility(kStoreIC_Miss)), 3, 1); | 1369 ExternalReference ref = ExternalReference(IC_Utility(kStoreIC_Miss)); |
| 1370 __ TailCallExternalReference(ref, 3, 1); |
| 1367 } | 1371 } |
| 1368 | 1372 |
| 1369 | 1373 |
| 1370 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { | 1374 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { |
| 1371 // ----------- S t a t e ------------- | 1375 // ----------- S t a t e ------------- |
| 1372 // -- rax : value | 1376 // -- rax : value |
| 1373 // -- rcx : name | 1377 // -- rcx : name |
| 1374 // -- rdx : receiver | 1378 // -- rdx : receiver |
| 1375 // -- rsp[0] : return address | 1379 // -- rsp[0] : return address |
| 1376 // ----------------------------------- | 1380 // ----------------------------------- |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1420 | 1424 |
| 1421 // Check that value is a smi. | 1425 // Check that value is a smi. |
| 1422 __ JumpIfNotSmi(value, &miss); | 1426 __ JumpIfNotSmi(value, &miss); |
| 1423 | 1427 |
| 1424 // Prepare tail call to StoreIC_ArrayLength. | 1428 // Prepare tail call to StoreIC_ArrayLength. |
| 1425 __ pop(scratch); | 1429 __ pop(scratch); |
| 1426 __ push(receiver); | 1430 __ push(receiver); |
| 1427 __ push(value); | 1431 __ push(value); |
| 1428 __ push(scratch); // return address | 1432 __ push(scratch); // return address |
| 1429 | 1433 |
| 1430 __ TailCallRuntime(ExternalReference(IC_Utility(kStoreIC_ArrayLength)), 2, 1); | 1434 ExternalReference ref = ExternalReference(IC_Utility(kStoreIC_ArrayLength)); |
| 1435 __ TailCallExternalReference(ref, 2, 1); |
| 1431 | 1436 |
| 1432 __ bind(&miss); | 1437 __ bind(&miss); |
| 1433 | 1438 |
| 1434 GenerateMiss(masm); | 1439 GenerateMiss(masm); |
| 1435 } | 1440 } |
| 1436 | 1441 |
| 1437 | 1442 |
| 1438 #undef __ | 1443 #undef __ |
| 1439 | 1444 |
| 1440 | 1445 |
| 1441 } } // namespace v8::internal | 1446 } } // namespace v8::internal |
| OLD | NEW |