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

Side by Side Diff: src/arm/lithium-codegen-arm.cc

Issue 11369014: Remove redundant loads in DoCheckMaps (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 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 | « 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 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 4816 matching lines...) Expand 10 before | Expand all | Expand 10 after
4827 DeoptimizeIf(ne, instr->environment()); 4827 DeoptimizeIf(ne, instr->environment());
4828 } 4828 }
4829 4829
4830 4830
4831 void LCodeGen::DoCheckMapCommon(Register reg, 4831 void LCodeGen::DoCheckMapCommon(Register reg,
4832 Register scratch, 4832 Register scratch,
4833 Handle<Map> map, 4833 Handle<Map> map,
4834 CompareMapMode mode, 4834 CompareMapMode mode,
4835 LEnvironment* env) { 4835 LEnvironment* env) {
4836 Label success; 4836 Label success;
4837 __ CompareMap(reg, scratch, map, &success, mode); 4837 __ CompareMap(reg, scratch, map, &success, mode);
danno 2012/11/07 22:42:41 Why not pass in the map register here, too (to avo
4838 DeoptimizeIf(ne, env); 4838 DeoptimizeIf(ne, env);
4839 __ bind(&success); 4839 __ bind(&success);
4840 } 4840 }
4841 4841
4842 4842
4843 void LCodeGen::DoCheckMaps(LCheckMaps* instr) { 4843 void LCodeGen::DoCheckMaps(LCheckMaps* instr) {
4844 Register scratch = scratch0(); 4844 Register scratch = scratch0();
4845 LOperand* input = instr->value(); 4845 LOperand* input = instr->value();
4846 ASSERT(input->IsRegister()); 4846 ASSERT(input->IsRegister());
4847 Register reg = ToRegister(input); 4847 Register reg = ToRegister(input);
4848 4848
4849 Label success; 4849 Label success;
4850 SmallMapList* map_set = instr->hydrogen()->map_set(); 4850 SmallMapList* map_set = instr->hydrogen()->map_set();
4851 __ ldr(scratch, FieldMemOperand(reg, HeapObject::kMapOffset));
4851 for (int i = 0; i < map_set->length() - 1; i++) { 4852 for (int i = 0; i < map_set->length() - 1; i++) {
4852 Handle<Map> map = map_set->at(i); 4853 Handle<Map> map = map_set->at(i);
4853 __ CompareMap(reg, scratch, map, &success, REQUIRE_EXACT_MAP); 4854 __ CompareMap(scratch, map, &success, REQUIRE_EXACT_MAP);
4854 __ b(eq, &success); 4855 __ b(eq, &success);
4855 } 4856 }
4856 Handle<Map> map = map_set->last(); 4857 Handle<Map> map = map_set->last();
4857 DoCheckMapCommon(reg, scratch, map, REQUIRE_EXACT_MAP, instr->environment()); 4858 DoCheckMapCommon(reg, scratch, map, REQUIRE_EXACT_MAP, instr->environment());
4858 __ bind(&success); 4859 __ bind(&success);
4859 } 4860 }
4860 4861
4861 4862
4862 void LCodeGen::DoClampDToUint8(LClampDToUint8* instr) { 4863 void LCodeGen::DoClampDToUint8(LClampDToUint8* instr) {
4863 DoubleRegister value_reg = ToDoubleRegister(instr->unclamped()); 4864 DoubleRegister value_reg = ToDoubleRegister(instr->unclamped());
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after
5680 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); 5681 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize));
5681 __ ldr(result, FieldMemOperand(scratch, 5682 __ ldr(result, FieldMemOperand(scratch,
5682 FixedArray::kHeaderSize - kPointerSize)); 5683 FixedArray::kHeaderSize - kPointerSize));
5683 __ bind(&done); 5684 __ bind(&done);
5684 } 5685 }
5685 5686
5686 5687
5687 #undef __ 5688 #undef __
5688 5689
5689 } } // namespace v8::internal 5690 } } // namespace v8::internal
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