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

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

Issue 12026014: Remove redundant check in LCodeGen::DoBoundsCheck (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 11 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 | 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 4136 matching lines...) Expand 10 before | Expand all | Expand 10 after
4147 int constant_index = 4147 int constant_index =
4148 ToInteger32(LConstantOperand::cast(instr->index())); 4148 ToInteger32(LConstantOperand::cast(instr->index()));
4149 if (instr->hydrogen()->length()->representation().IsTagged()) { 4149 if (instr->hydrogen()->length()->representation().IsTagged()) {
4150 __ cmp(ToOperand(instr->length()), 4150 __ cmp(ToOperand(instr->length()),
4151 Immediate(Smi::FromInt(constant_index))); 4151 Immediate(Smi::FromInt(constant_index)));
4152 } else { 4152 } else {
4153 __ cmp(ToOperand(instr->length()), Immediate(constant_index)); 4153 __ cmp(ToOperand(instr->length()), Immediate(constant_index));
4154 } 4154 }
4155 DeoptimizeIf(below_equal, instr->environment()); 4155 DeoptimizeIf(below_equal, instr->environment());
4156 } else { 4156 } else {
4157 if (instr->hydrogen()->index()->representation().IsTagged() &&
4158 !instr->hydrogen()->index()->type().IsSmi()) {
4159 __ test(ToRegister(instr->index()), Immediate(kSmiTagMask));
4160 DeoptimizeIf(not_zero, instr->environment());
4161 }
4162 __ cmp(ToRegister(instr->index()), ToOperand(instr->length())); 4157 __ cmp(ToRegister(instr->index()), ToOperand(instr->length()));
4163 DeoptimizeIf(above_equal, instr->environment()); 4158 DeoptimizeIf(above_equal, instr->environment());
4164 } 4159 }
4165 } 4160 }
4166 4161
4167 4162
4168 void LCodeGen::DoStoreKeyedExternalArray(LStoreKeyed* instr) { 4163 void LCodeGen::DoStoreKeyedExternalArray(LStoreKeyed* instr) {
4169 ElementsKind elements_kind = instr->elements_kind(); 4164 ElementsKind elements_kind = instr->elements_kind();
4170 LOperand* key = instr->key(); 4165 LOperand* key = instr->key();
4171 if (!key->IsConstantOperand() && 4166 if (!key->IsConstantOperand() &&
(...skipping 1805 matching lines...) Expand 10 before | Expand all | Expand 10 after
5977 FixedArray::kHeaderSize - kPointerSize)); 5972 FixedArray::kHeaderSize - kPointerSize));
5978 __ bind(&done); 5973 __ bind(&done);
5979 } 5974 }
5980 5975
5981 5976
5982 #undef __ 5977 #undef __
5983 5978
5984 } } // namespace v8::internal 5979 } } // namespace v8::internal
5985 5980
5986 #endif // V8_TARGET_ARCH_IA32 5981 #endif // V8_TARGET_ARCH_IA32
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