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

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

Issue 10375033: Fix unsigned-Smi check in MappedArgumentsLookup (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 7 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
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 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 Label* slow_case) { 760 Label* slow_case) {
761 // Check that the receiver is a JSObject. Because of the map check 761 // Check that the receiver is a JSObject. Because of the map check
762 // later, we do not need to check for interceptors or whether it 762 // later, we do not need to check for interceptors or whether it
763 // requires access checks. 763 // requires access checks.
764 __ JumpIfSmi(object, slow_case); 764 __ JumpIfSmi(object, slow_case);
765 // Check that the object is some kind of JSObject. 765 // Check that the object is some kind of JSObject.
766 __ GetObjectType(object, scratch1, scratch2); 766 __ GetObjectType(object, scratch1, scratch2);
767 __ Branch(slow_case, lt, scratch2, Operand(FIRST_JS_RECEIVER_TYPE)); 767 __ Branch(slow_case, lt, scratch2, Operand(FIRST_JS_RECEIVER_TYPE));
768 768
769 // Check that the key is a positive smi. 769 // Check that the key is a positive smi.
770 __ And(scratch1, key, Operand(0x8000001)); 770 __ And(scratch1, key, Operand(0x80000001));
771 __ Branch(slow_case, ne, scratch1, Operand(zero_reg)); 771 __ Branch(slow_case, ne, scratch1, Operand(zero_reg));
772 772
773 // Load the elements into scratch1 and check its map. 773 // Load the elements into scratch1 and check its map.
774 __ lw(scratch1, FieldMemOperand(object, JSObject::kElementsOffset)); 774 __ lw(scratch1, FieldMemOperand(object, JSObject::kElementsOffset));
775 __ CheckMap(scratch1, 775 __ CheckMap(scratch1,
776 scratch2, 776 scratch2,
777 Heap::kNonStrictArgumentsElementsMapRootIndex, 777 Heap::kNonStrictArgumentsElementsMapRootIndex,
778 slow_case, 778 slow_case,
779 DONT_DO_SMI_CHECK); 779 DONT_DO_SMI_CHECK);
780 // Check if element is in the range of mapped arguments. If not, jump 780 // Check if element is in the range of mapped arguments. If not, jump
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after
1752 } else { 1752 } else {
1753 ASSERT(Assembler::IsBne(branch_instr)); 1753 ASSERT(Assembler::IsBne(branch_instr));
1754 patcher.ChangeBranchCondition(eq); 1754 patcher.ChangeBranchCondition(eq);
1755 } 1755 }
1756 } 1756 }
1757 1757
1758 1758
1759 } } // namespace v8::internal 1759 } } // namespace v8::internal
1760 1760
1761 #endif // V8_TARGET_ARCH_MIPS 1761 #endif // V8_TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698