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

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

Issue 7276027: MIPS: port Fix receiver check in arguments ICs. (Closed)
Patch Set: Created 9 years, 5 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
« no previous file with comments | « no previous file | no next file » | 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 885 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 static MemOperand GenerateMappedArgumentsLookup(MacroAssembler* masm, 896 static MemOperand GenerateMappedArgumentsLookup(MacroAssembler* masm,
897 Register object, 897 Register object,
898 Register key, 898 Register key,
899 Register scratch1, 899 Register scratch1,
900 Register scratch2, 900 Register scratch2,
901 Register scratch3, 901 Register scratch3,
902 Label* unmapped_case, 902 Label* unmapped_case,
903 Label* slow_case) { 903 Label* slow_case) {
904 Heap* heap = masm->isolate()->heap(); 904 Heap* heap = masm->isolate()->heap();
905 905
906 // Check that the receiver isn't a smi. 906 // Check that the receiver is a JSObject. Because of the map check
907 // later, we do not need to check for interceptors or whether it
908 // requires access checks.
907 __ JumpIfSmi(object, slow_case); 909 __ JumpIfSmi(object, slow_case);
910 // Check that the object is some kind of JSObject.
911 __ GetObjectType(object, scratch1, scratch2);
912 __ Branch(slow_case, lt, scratch2, Operand(FIRST_JS_RECEIVER_TYPE));
908 913
909 // Check that the key is a positive smi. 914 // Check that the key is a positive smi.
910 __ And(scratch1, key, Operand(0x8000001)); 915 __ And(scratch1, key, Operand(0x8000001));
911 __ Branch(slow_case, ne, scratch1, Operand(zero_reg)); 916 __ Branch(slow_case, ne, scratch1, Operand(zero_reg));
912 917
913 // Load the elements into scratch1 and check its map. 918 // Load the elements into scratch1 and check its map.
914 Handle<Map> arguments_map(heap->non_strict_arguments_elements_map()); 919 Handle<Map> arguments_map(heap->non_strict_arguments_elements_map());
915 __ lw(scratch1, FieldMemOperand(object, JSObject::kElementsOffset)); 920 __ lw(scratch1, FieldMemOperand(object, JSObject::kElementsOffset));
916 __ CheckMap(scratch1, scratch2, arguments_map, slow_case, DONT_DO_SMI_CHECK); 921 __ CheckMap(scratch1, scratch2, arguments_map, slow_case, DONT_DO_SMI_CHECK);
917 922
(...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after
1732 Register reg = Register::from_code(Assembler::GetRs(instr_at_patch)); 1737 Register reg = Register::from_code(Assembler::GetRs(instr_at_patch));
1733 patcher.masm()->andi(at, reg, kSmiTagMask); 1738 patcher.masm()->andi(at, reg, kSmiTagMask);
1734 patcher.ChangeBranchCondition(eq); 1739 patcher.ChangeBranchCondition(eq);
1735 } 1740 }
1736 } 1741 }
1737 1742
1738 1743
1739 } } // namespace v8::internal 1744 } } // namespace v8::internal
1740 1745
1741 #endif // V8_TARGET_ARCH_MIPS 1746 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698