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

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

Issue 9023006: Remove unnecessary environment from LStoreKeyedFastElements. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: removed one redundant smi-check Created 9 years 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
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 3182 matching lines...) Expand 10 before | Expand all | Expand 10 after
3193 } 3193 }
3194 DeoptimizeIf(below_equal, instr->environment()); 3194 DeoptimizeIf(below_equal, instr->environment());
3195 } 3195 }
3196 3196
3197 3197
3198 void LCodeGen::DoStoreKeyedFastElement(LStoreKeyedFastElement* instr) { 3198 void LCodeGen::DoStoreKeyedFastElement(LStoreKeyedFastElement* instr) {
3199 Register value = ToRegister(instr->value()); 3199 Register value = ToRegister(instr->value());
3200 Register elements = ToRegister(instr->object()); 3200 Register elements = ToRegister(instr->object());
3201 Register key = instr->key()->IsRegister() ? ToRegister(instr->key()) : no_reg; 3201 Register key = instr->key()->IsRegister() ? ToRegister(instr->key()) : no_reg;
3202 3202
3203 // This instruction cannot handle the FAST_SMI_ONLY_ELEMENTS -> FAST_ELEMENTS
3204 // conversion, so it deopts in that case.
3205 if (instr->hydrogen()->ValueNeedsSmiCheck()) {
3206 Condition cc = masm()->CheckSmi(value);
3207 DeoptimizeIf(NegateCondition(cc), instr->environment());
3208 }
3209
3210 // Do the store. 3203 // Do the store.
3211 if (instr->key()->IsConstantOperand()) { 3204 if (instr->key()->IsConstantOperand()) {
3212 ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); 3205 ASSERT(!instr->hydrogen()->NeedsWriteBarrier());
3213 LConstantOperand* const_operand = LConstantOperand::cast(instr->key()); 3206 LConstantOperand* const_operand = LConstantOperand::cast(instr->key());
3214 int offset = 3207 int offset =
3215 ToInteger32(const_operand) * kPointerSize + FixedArray::kHeaderSize; 3208 ToInteger32(const_operand) * kPointerSize + FixedArray::kHeaderSize;
3216 __ movq(FieldOperand(elements, offset), value); 3209 __ movq(FieldOperand(elements, offset), value);
3217 } else { 3210 } else {
3218 __ movq(FieldOperand(elements, 3211 __ movq(FieldOperand(elements,
3219 key, 3212 key,
(...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after
4336 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); 4329 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt);
4337 ASSERT(osr_pc_offset_ == -1); 4330 ASSERT(osr_pc_offset_ == -1);
4338 osr_pc_offset_ = masm()->pc_offset(); 4331 osr_pc_offset_ = masm()->pc_offset();
4339 } 4332 }
4340 4333
4341 #undef __ 4334 #undef __
4342 4335
4343 } } // namespace v8::internal 4336 } } // namespace v8::internal
4344 4337
4345 #endif // V8_TARGET_ARCH_X64 4338 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/hydrogen.cc ('K') | « src/mips/lithium-mips.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698