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

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

Issue 8068024: Simplify compares in KeyedStoreIC::GenerateGeneric. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 2 months 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/arm/ic-arm.cc ('k') | src/x64/ic-x64.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 // Check that the receiver does not require access checks. We need 745 // Check that the receiver does not require access checks. We need
746 // to do this because this generic stub does not perform map checks. 746 // to do this because this generic stub does not perform map checks.
747 __ test_b(FieldOperand(edi, Map::kBitFieldOffset), 747 __ test_b(FieldOperand(edi, Map::kBitFieldOffset),
748 1 << Map::kIsAccessCheckNeeded); 748 1 << Map::kIsAccessCheckNeeded);
749 __ j(not_zero, &slow); 749 __ j(not_zero, &slow);
750 // Check that the key is a smi. 750 // Check that the key is a smi.
751 __ JumpIfNotSmi(ecx, &slow); 751 __ JumpIfNotSmi(ecx, &slow);
752 __ CmpInstanceType(edi, JS_ARRAY_TYPE); 752 __ CmpInstanceType(edi, JS_ARRAY_TYPE);
753 __ j(equal, &array); 753 __ j(equal, &array);
754 // Check that the object is some kind of JSObject. 754 // Check that the object is some kind of JSObject.
755 __ CmpInstanceType(edi, FIRST_JS_RECEIVER_TYPE); 755 __ CmpInstanceType(edi, FIRST_JS_OBJECT_TYPE);
756 __ j(below, &slow); 756 __ j(below, &slow);
757 __ CmpInstanceType(edi, JS_PROXY_TYPE);
758 __ j(equal, &slow);
759 __ CmpInstanceType(edi, JS_FUNCTION_PROXY_TYPE);
760 __ j(equal, &slow);
761 757
762 // Object case: Check key against length in the elements array. 758 // Object case: Check key against length in the elements array.
763 // eax: value 759 // eax: value
764 // edx: JSObject 760 // edx: JSObject
765 // ecx: key (a smi) 761 // ecx: key (a smi)
766 // edi: receiver map 762 // edi: receiver map
767 __ mov(ebx, FieldOperand(edx, JSObject::kElementsOffset)); 763 __ mov(ebx, FieldOperand(edx, JSObject::kElementsOffset));
768 // Check that the object is in fast mode and writable. 764 // Check that the object is in fast mode and writable.
769 __ cmp(ecx, FieldOperand(ebx, FixedArray::kLengthOffset)); 765 __ cmp(ecx, FieldOperand(ebx, FixedArray::kLengthOffset));
770 __ j(below, &fast_object_with_map_check); 766 __ j(below, &fast_object_with_map_check);
(...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after
1683 Condition cc = *jmp_address == Assembler::kJncShortOpcode 1679 Condition cc = *jmp_address == Assembler::kJncShortOpcode
1684 ? not_zero 1680 ? not_zero
1685 : zero; 1681 : zero;
1686 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 1682 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
1687 } 1683 }
1688 1684
1689 1685
1690 } } // namespace v8::internal 1686 } } // namespace v8::internal
1691 1687
1692 #endif // V8_TARGET_ARCH_IA32 1688 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/ic-arm.cc ('k') | src/x64/ic-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698