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

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

Issue 68213024: Remove keyed load "force generic" miss case. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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 | « src/builtins.cc ('k') | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 &miss, // When not a number. 604 &miss, // When not a number.
605 &miss, // When index out of range. 605 &miss, // When index out of range.
606 STRING_INDEX_IS_ARRAY_INDEX); 606 STRING_INDEX_IS_ARRAY_INDEX);
607 char_at_generator.GenerateFast(masm); 607 char_at_generator.GenerateFast(masm);
608 __ ret(0); 608 __ ret(0);
609 609
610 StubRuntimeCallHelper call_helper; 610 StubRuntimeCallHelper call_helper;
611 char_at_generator.GenerateSlow(masm, call_helper); 611 char_at_generator.GenerateSlow(masm, call_helper);
612 612
613 __ bind(&miss); 613 __ bind(&miss);
614 GenerateMiss(masm, MISS); 614 GenerateMiss(masm);
615 } 615 }
616 616
617 617
618 void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) { 618 void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) {
619 // ----------- S t a t e ------------- 619 // ----------- S t a t e -------------
620 // -- ecx : key 620 // -- ecx : key
621 // -- edx : receiver 621 // -- edx : receiver
622 // -- esp[0] : return address 622 // -- esp[0] : return address
623 // ----------------------------------- 623 // -----------------------------------
624 Label slow; 624 Label slow;
(...skipping 21 matching lines...) Expand all
646 __ push(ecx); // key 646 __ push(ecx); // key
647 __ push(eax); // return address 647 __ push(eax); // return address
648 648
649 // Perform tail call to the entry. 649 // Perform tail call to the entry.
650 ExternalReference ref = 650 ExternalReference ref =
651 ExternalReference(IC_Utility(kKeyedLoadPropertyWithInterceptor), 651 ExternalReference(IC_Utility(kKeyedLoadPropertyWithInterceptor),
652 masm->isolate()); 652 masm->isolate());
653 __ TailCallExternalReference(ref, 2, 1); 653 __ TailCallExternalReference(ref, 2, 1);
654 654
655 __ bind(&slow); 655 __ bind(&slow);
656 GenerateMiss(masm, MISS); 656 GenerateMiss(masm);
657 } 657 }
658 658
659 659
660 void KeyedLoadIC::GenerateNonStrictArguments(MacroAssembler* masm) { 660 void KeyedLoadIC::GenerateNonStrictArguments(MacroAssembler* masm) {
661 // ----------- S t a t e ------------- 661 // ----------- S t a t e -------------
662 // -- ecx : key 662 // -- ecx : key
663 // -- edx : receiver 663 // -- edx : receiver
664 // -- esp[0] : return address 664 // -- esp[0] : return address
665 // ----------------------------------- 665 // -----------------------------------
666 Label slow, notin; 666 Label slow, notin;
667 Factory* factory = masm->isolate()->factory(); 667 Factory* factory = masm->isolate()->factory();
668 Operand mapped_location = 668 Operand mapped_location =
669 GenerateMappedArgumentsLookup(masm, edx, ecx, ebx, eax, &notin, &slow); 669 GenerateMappedArgumentsLookup(masm, edx, ecx, ebx, eax, &notin, &slow);
670 __ mov(eax, mapped_location); 670 __ mov(eax, mapped_location);
671 __ Ret(); 671 __ Ret();
672 __ bind(&notin); 672 __ bind(&notin);
673 // The unmapped lookup expects that the parameter map is in ebx. 673 // The unmapped lookup expects that the parameter map is in ebx.
674 Operand unmapped_location = 674 Operand unmapped_location =
675 GenerateUnmappedArgumentsLookup(masm, ecx, ebx, eax, &slow); 675 GenerateUnmappedArgumentsLookup(masm, ecx, ebx, eax, &slow);
676 __ cmp(unmapped_location, factory->the_hole_value()); 676 __ cmp(unmapped_location, factory->the_hole_value());
677 __ j(equal, &slow); 677 __ j(equal, &slow);
678 __ mov(eax, unmapped_location); 678 __ mov(eax, unmapped_location);
679 __ Ret(); 679 __ Ret();
680 __ bind(&slow); 680 __ bind(&slow);
681 GenerateMiss(masm, MISS); 681 GenerateMiss(masm);
682 } 682 }
683 683
684 684
685 void KeyedStoreIC::GenerateNonStrictArguments(MacroAssembler* masm) { 685 void KeyedStoreIC::GenerateNonStrictArguments(MacroAssembler* masm) {
686 // ----------- S t a t e ------------- 686 // ----------- S t a t e -------------
687 // -- eax : value 687 // -- eax : value
688 // -- ecx : key 688 // -- ecx : key
689 // -- edx : receiver 689 // -- edx : receiver
690 // -- esp[0] : return address 690 // -- esp[0] : return address
691 // ----------------------------------- 691 // -----------------------------------
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after
1389 __ pop(ebx); 1389 __ pop(ebx);
1390 __ push(edx); // receiver 1390 __ push(edx); // receiver
1391 __ push(ecx); // name 1391 __ push(ecx); // name
1392 __ push(ebx); // return address 1392 __ push(ebx); // return address
1393 1393
1394 // Perform tail call to the entry. 1394 // Perform tail call to the entry.
1395 __ TailCallRuntime(Runtime::kGetProperty, 2, 1); 1395 __ TailCallRuntime(Runtime::kGetProperty, 2, 1);
1396 } 1396 }
1397 1397
1398 1398
1399 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm, ICMissMode miss_mode) { 1399 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
1400 // ----------- S t a t e ------------- 1400 // ----------- S t a t e -------------
1401 // -- ecx : key 1401 // -- ecx : key
1402 // -- edx : receiver 1402 // -- edx : receiver
1403 // -- esp[0] : return address 1403 // -- esp[0] : return address
1404 // ----------------------------------- 1404 // -----------------------------------
1405 1405
1406 __ IncrementCounter(masm->isolate()->counters()->keyed_load_miss(), 1); 1406 __ IncrementCounter(masm->isolate()->counters()->keyed_load_miss(), 1);
1407 1407
1408 __ pop(ebx); 1408 __ pop(ebx);
1409 __ push(edx); // receiver 1409 __ push(edx); // receiver
1410 __ push(ecx); // name 1410 __ push(ecx); // name
1411 __ push(ebx); // return address 1411 __ push(ebx); // return address
1412 1412
1413 // Perform tail call to the entry. 1413 // Perform tail call to the entry.
1414 ExternalReference ref = miss_mode == MISS_FORCE_GENERIC 1414 ExternalReference ref =
1415 ? ExternalReference(IC_Utility(kKeyedLoadIC_MissForceGeneric), 1415 ExternalReference(IC_Utility(kKeyedLoadIC_Miss), masm->isolate());
1416 masm->isolate())
1417 : ExternalReference(IC_Utility(kKeyedLoadIC_Miss), masm->isolate());
1418 __ TailCallExternalReference(ref, 2, 1); 1416 __ TailCallExternalReference(ref, 2, 1);
1419 } 1417 }
1420 1418
1421 1419
1422 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { 1420 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
1423 // ----------- S t a t e ------------- 1421 // ----------- S t a t e -------------
1424 // -- ecx : key 1422 // -- ecx : key
1425 // -- edx : receiver 1423 // -- edx : receiver
1426 // -- esp[0] : return address 1424 // -- esp[0] : return address
1427 // ----------------------------------- 1425 // -----------------------------------
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
1679 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) 1677 Condition cc = (check == ENABLE_INLINED_SMI_CHECK)
1680 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) 1678 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero)
1681 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); 1679 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry);
1682 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 1680 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
1683 } 1681 }
1684 1682
1685 1683
1686 } } // namespace v8::internal 1684 } } // namespace v8::internal
1687 1685
1688 #endif // V8_TARGET_ARCH_IA32 1686 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698