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

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

Issue 7259015: Fix receiver check in arguments ICs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comments. Created 9 years, 6 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 | « no previous file | src/ia32/ic-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 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 874 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 static MemOperand GenerateMappedArgumentsLookup(MacroAssembler* masm, 885 static MemOperand GenerateMappedArgumentsLookup(MacroAssembler* masm,
886 Register object, 886 Register object,
887 Register key, 887 Register key,
888 Register scratch1, 888 Register scratch1,
889 Register scratch2, 889 Register scratch2,
890 Register scratch3, 890 Register scratch3,
891 Label* unmapped_case, 891 Label* unmapped_case,
892 Label* slow_case) { 892 Label* slow_case) {
893 Heap* heap = masm->isolate()->heap(); 893 Heap* heap = masm->isolate()->heap();
894 894
895 // Check that the receiver isn't a smi. 895 // Check that the receiver is a JSObject. Because of the map check
896 // later, we do not need to check for interceptors or whether it
897 // requires access checks.
896 __ JumpIfSmi(object, slow_case); 898 __ JumpIfSmi(object, slow_case);
899 // Check that the object is some kind of JSObject.
900 __ CompareObjectType(object, scratch1, scratch2, FIRST_JS_RECEIVER_TYPE);
901 __ b(lt, slow_case);
897 902
898 // Check that the key is a positive smi. 903 // Check that the key is a positive smi.
899 __ tst(key, Operand(0x8000001)); 904 __ tst(key, Operand(0x8000001));
900 __ b(ne, slow_case); 905 __ b(ne, slow_case);
901 906
902 // Load the elements into scratch1 and check its map. 907 // Load the elements into scratch1 and check its map.
903 Handle<Map> arguments_map(heap->non_strict_arguments_elements_map()); 908 Handle<Map> arguments_map(heap->non_strict_arguments_elements_map());
904 __ ldr(scratch1, FieldMemOperand(object, JSObject::kElementsOffset)); 909 __ ldr(scratch1, FieldMemOperand(object, JSObject::kElementsOffset));
905 __ CheckMap(scratch1, scratch2, arguments_map, slow_case, DONT_DO_SMI_CHECK); 910 __ CheckMap(scratch1, scratch2, arguments_map, slow_case, DONT_DO_SMI_CHECK);
906 911
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
1708 Register reg = Assembler::GetRn(instr_at_patch); 1713 Register reg = Assembler::GetRn(instr_at_patch);
1709 patcher.masm()->tst(reg, Operand(kSmiTagMask)); 1714 patcher.masm()->tst(reg, Operand(kSmiTagMask));
1710 patcher.EmitCondition(eq); 1715 patcher.EmitCondition(eq);
1711 } 1716 }
1712 } 1717 }
1713 1718
1714 1719
1715 } } // namespace v8::internal 1720 } } // namespace v8::internal
1716 1721
1717 #endif // V8_TARGET_ARCH_ARM 1722 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/ia32/ic-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698