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

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

Issue 17568015: New array bounds check elimination pass (focused on induction variables and bitwise operations). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Switched flag to false by default. Created 7 years, 4 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 | « src/ia32/lithium-codegen-ia32.cc ('k') | src/token.h » ('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 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 4164 matching lines...) Expand 10 before | Expand all | Expand 10 after
4175 Handle<Code> ic = (instr->strict_mode_flag() == kStrictMode) 4175 Handle<Code> ic = (instr->strict_mode_flag() == kStrictMode)
4176 ? isolate()->builtins()->StoreIC_Initialize_Strict() 4176 ? isolate()->builtins()->StoreIC_Initialize_Strict()
4177 : isolate()->builtins()->StoreIC_Initialize(); 4177 : isolate()->builtins()->StoreIC_Initialize();
4178 CallCode(ic, RelocInfo::CODE_TARGET, instr); 4178 CallCode(ic, RelocInfo::CODE_TARGET, instr);
4179 } 4179 }
4180 4180
4181 4181
4182 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) { 4182 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) {
4183 if (instr->hydrogen()->skip_check()) return; 4183 if (instr->hydrogen()->skip_check()) return;
4184 4184
4185 Condition condition = instr->hydrogen()->allow_equality() ? hi : hs;
4185 if (instr->index()->IsConstantOperand()) { 4186 if (instr->index()->IsConstantOperand()) {
4186 int constant_index = 4187 int constant_index =
4187 ToInteger32(LConstantOperand::cast(instr->index())); 4188 ToInteger32(LConstantOperand::cast(instr->index()));
4188 if (instr->hydrogen()->length()->representation().IsSmi()) { 4189 if (instr->hydrogen()->length()->representation().IsSmi()) {
4189 __ li(at, Operand(Smi::FromInt(constant_index))); 4190 __ li(at, Operand(Smi::FromInt(constant_index)));
4190 } else { 4191 } else {
4191 __ li(at, Operand(constant_index)); 4192 __ li(at, Operand(constant_index));
4192 } 4193 }
4193 DeoptimizeIf(hs, 4194 DeoptimizeIf(condition,
4194 instr->environment(), 4195 instr->environment(),
4195 at, 4196 at,
4196 Operand(ToRegister(instr->length()))); 4197 Operand(ToRegister(instr->length())));
4197 } else { 4198 } else {
4198 DeoptimizeIf(hs, 4199 DeoptimizeIf(condition,
4199 instr->environment(), 4200 instr->environment(),
4200 ToRegister(instr->index()), 4201 ToRegister(instr->index()),
4201 Operand(ToRegister(instr->length()))); 4202 Operand(ToRegister(instr->length())));
4202 } 4203 }
4203 } 4204 }
4204 4205
4205 4206
4206 void LCodeGen::DoStoreKeyedExternalArray(LStoreKeyed* instr) { 4207 void LCodeGen::DoStoreKeyedExternalArray(LStoreKeyed* instr) {
4207 Register external_pointer = ToRegister(instr->elements()); 4208 Register external_pointer = ToRegister(instr->elements());
4208 Register key = no_reg; 4209 Register key = no_reg;
(...skipping 1612 matching lines...) Expand 10 before | Expand all | Expand 10 after
5821 __ Subu(scratch, result, scratch); 5822 __ Subu(scratch, result, scratch);
5822 __ lw(result, FieldMemOperand(scratch, 5823 __ lw(result, FieldMemOperand(scratch,
5823 FixedArray::kHeaderSize - kPointerSize)); 5824 FixedArray::kHeaderSize - kPointerSize));
5824 __ bind(&done); 5825 __ bind(&done);
5825 } 5826 }
5826 5827
5827 5828
5828 #undef __ 5829 #undef __
5829 5830
5830 } } // namespace v8::internal 5831 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/token.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698